Short of creating a custom button control, is there any way to remove the dotted inner border from a button control that has focus?
Posted on 2001-06-19 10:38:00 by 4oh4
Send WM_KILLFOCUS message to the button.

invoke SendDlgItemMessage, hWnd, IDC_MYBUTTON, WM_KILLFOCUS,  0, 0
Posted on 2001-06-19 12:25:00 by Iczelion
Actually, that's too many params. But it works like a charm as:

invoke SendDlgItemMessage, hWnd, WM_KILLFOCUS, 0, 0
Thanks
Posted on 2001-06-19 14:49:00 by 4oh4

 40h4 or Iczelion, will the button control has keyboard focus
 if you remove the hatch marks??


Posted on 2001-06-19 22:24:00 by disease_2000
4oh4, I'm probably being picky, but just in case anyone misunderstands... Iczelion is right, and so are you, but the message you're desribing is SendMessage, Iczelion gave the parameters for SendDlgItemMessage. Disease_2000, The focus will be lost in the either, if you send a KillFocus then the focus is lost from the control, but there was no SetFocus, so it's 'unpredictable' - The window/dialog will still be active, so I would assume that it would have the focus. A slightly better approach would be to place the focus eleswhere, rather than removing the focus from the button. It has the same effect (i.e. removing the dotted rectangle) but you know where you focus is going. I've always found messing with focus a nightmare, once you start playing with it, it seems to take on a life of it's own.... umbongo
Posted on 2001-06-20 04:16:00 by umbongo
...oops! It's amazing, that with my penchant for mis-reading bits of code, I ever get any code right at all.
Posted on 2001-06-20 10:07:00 by 4oh4