subclass window assert
5 messages in this thread
David,
this is due to CTL3D, since it subclasses all the controls in your dialog
before your OnInitDialog is called. MFC checks the window proc when subclassing
and complains. The easiest way to circumvent should be to swich off automatic
subclassing and to to this manually in your OnInitDialog.
ThomasZ
Thomas,
I am _not_ using AutoSubclass. I call Ctl3dSubclassDlgEx in every one of my
dialogs (except a few).
-DW
David,
do you call it after you call the base class OnInitDialog ?
ThomasZ
Thomas,
I have tried it both ways! Sometimes it works, and sometimes not.
The app is MDI, and I have a couple of View windows that I call it in
OnInitialUpdate for. I find this is somewhat erratic. Some dialogs always work,
and some sometimes do & sometimes don't.
HELP, PLEASE. This is very urgent, as I have just about completed this
application, and this bug has crept in out of the blue.
Thanks,
DW
David,
you should always call Ctl3dSubclassDlgEx as late as possible. But presumably
this isn't the problem ( but you could just turn off 3D for making this sure ).
>> Sometimes it works, and sometimes not.
Could this be related to whether there are several dialogs up the same time,
eventually in a specific order ? Maybe you assigned a derived control class to
different controls in different dialogs ?
ThomasZ