mfc - CButton gets send WM_SETSTYLE to BS_DEFPUSHBUTTON Message when clicked -
i have several cbutton
objects. when click them, send wm_setstyle
message changing style bs_pushbutton
bs_defpushbutton
. change permanent , not go away when push button.
cbutton* button = new cbutton; button->create(l"button", ws_child | ws_visible , crect( 10,10,100,100), this, idc_button);
what cause behaviour?
for testing purposes created new project scratch. there buttons don't changed. not able figure out, differently.
in dialog or window child windows states handled wm_nextdlgctl respective cwnd::gotodlgctrl , cwnd::nextdlgctrl/prevdlgctrl
you should never use setfocus in dialog when buttons involved.
Comments
Post a Comment