News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Dotted box around buttons

Started by Mr Earl, October 03, 2005, 02:52:12 PM

Previous topic - Next topic

Mr Earl

What causes the dotted box around buttons in a dialog box?
How can I avoid them? What are they called?  Is there any
reference material explaining them?  I couldn't find any.

Jimg

The dots show which control or button has the focus, so if you just hit enter, it will press the button.

If you want to remove the dots, you will have to move the focus elsewhere, eg. to another control-

inv GetDlgItem,hWnd,MyDummyButtonId
inv SetFocus,eax    ; get the focus off the button

That will still leave the button with a darker outline.  To get rid of the darker outline-

inv SendMessage, lParam, BM_SETSTYLE, BS_PUSHBUTTON, TRUE  ; make button look normal

Mr Earl