CompuServe Thread

subclass window assert

5 messages in this thread
#30238From: Thomas Zeisluft [MVP]Jul 8, 1994 3:22 AM
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
#30423From: David WerdigerJul 10, 1994 5:07 PM
Thomas, I am _not_ using AutoSubclass. I call Ctl3dSubclassDlgEx in every one of my dialogs (except a few). -DW
#30468From: Thomas Zeisluft [MVP]Jul 11, 1994 3:21 AM
David, do you call it after you call the base class OnInitDialog ? ThomasZ
#30587From: David WerdigerJul 11, 1994 8:25 PM
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
#30638From: Thomas Zeisluft [MVP]Jul 12, 1994 2:57 AM
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