MDIForm HELP !!!

by2492
04-15-2003, 10: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.

matrixhacker
04-15-2003, 11:06 AM
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?

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

matrixhacker
04-15-2003, 11:27 AM
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