Short of creating a custom button control, is there any way to remove the dotted inner border from a button control that has focus?
Send WM_KILLFOCUS message to the button.
invoke SendDlgItemMessage, hWnd, IDC_MYBUTTON, WM_KILLFOCUS, 0, 0
Actually, that's too many params. But it works like a charm as:
invoke SendDlgItemMessage, hWnd, WM_KILLFOCUS, 0, 0
40h4 or Iczelion, will the button control has keyboard focus if you remove the hatch marks??
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
...oops! It's amazing, that with my penchant for mis-reading bits of code, I ever get any code right at all.