MDIForm HELP !!!

04-15-2003, 11:30 AM
i have a MDIForm, with some MDIChild's, and a ToolBar on the MDIForm with one Button.

in order to avoid putting code in all child, i decide to subclass each MDIChild.

so, what i want to do is: if one of the child is activate, the button on the MDIForm will be Enable, otherwise the button will be disable.

so, in the subclass i catch the WM_CHILDACTIVATE, and enable this button, also i catch the WM_DESTROY, and disable the button.

the problem is that the WM_CHILDACTIVATE occur before the WM_DESTROY, and the button is stay disable.

04-15-2003, 12:06 PM
what was the point of using subclassing? when i would probably have used booleans. When the child form activates and deavtivates make a boolean true or false, then you will know for sure without relying on subclassing?

04-15-2003, 12:16 PM
like i say before i want to avoid putting code in each MDIChild.

04-15-2003, 12:27 PM
why is that?, put some code in a module if you are that bothered

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum