The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Mr Earl on October 03, 2005, 02:52:12 PM

Title: Dotted box around buttons
Post by: Mr Earl on October 03, 2005, 02:52:12 PM
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.
Title: Re: Dotted box around buttons
Post by: Jimg on October 03, 2005, 03:24:49 PM
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
Title: Re: Dotted box around buttons
Post by: Mr Earl on October 03, 2005, 04:16:09 PM
Thanks Jim.