I have placed two CButtons on a CStatic dynamically (i.e. I call CButton()->Create( CStatic as parent );
The buttons display fine, but when tabbing around them (changing focus), the default (black) border does not disappear. It looks as though all the buttons on the window are the default and this is not the case (actually none of them are).
I have found a workaround, but still not sure why this works and if it is a good workaround. If I override the CButton::OnKillFocus() and call SetButtonStyle(BS_PUSHBUTTON); (before the CWnd::OnKillFocus()), everything works fine.
Why? and is this a fix?