CButton in a CDialogBar are disabled
-
Whit the resource editor I've created a DialogBar whit button, combo box, check box... When I wan't to enable/disable them I use the member variable I've create just for them and call theControlVariable.EnableWindow(TRUE); and it's work very fine... except for push button who become enable and immediatly after disabled... why? thanks Remi Morin Rmorin@Operamail.com Remi.Morin@Lyrtech.com
-
Whit the resource editor I've created a DialogBar whit button, combo box, check box... When I wan't to enable/disable them I use the member variable I've create just for them and call theControlVariable.EnableWindow(TRUE); and it's work very fine... except for push button who become enable and immediatly after disabled... why? thanks Remi Morin Rmorin@Operamail.com Remi.Morin@Lyrtech.com
CDialogBar uses command UI update mechanism for buttons. You should add ON_COMMAND handler in the frame class - this will solve the problem of disabled button and provide a place for code which will be executed when user pushes the button. If you want to conditionally enable/disable the button, add ON_UPDATE_COMMAND_UI as well. Tomasz Sowinski -- http://www.shooltz.com