Page 1 of 1

Underlines, SetDlgItemText, and random emulation

Posted: Tue Mar 02, 2004 11:57 pm
by fliptw
watch out. code snippets

Code: Select all

//from a random header:
#define BUTTON_OK "&OK"

//inside the WM_INITDIALOG block:
SetDlgItemText(hDlg,IDC_OK,BUTTON_OK);
Doing it that way sets the text OK, but the underline under the "O" doesn't appear.

So, how do I make the underline So?

Posted: Wed Mar 03, 2004 1:47 am
by SuperSheep
Does the button work with Alt-O?

If it doesn't, then the only thing I could find dredging through the MSDN docs is SS_NOPREFIX. Make sure that isn't set for that control.

Other than that, try...

SetDlgItemText(hDlg, IDC_OK, "&Ok");

See maybe if that works, then possibly you might be changing the value of BUTTON_OK somewhere?

Posted: Wed Mar 03, 2004 2:56 am
by fliptw
Im a farking idiot.

I set windows not to show the underline till I hit alt.

doh.