MDI Window Problem in Win2K

Started by
4 comments, last by Warden 22 years, 2 months ago
I''m creating an MDI for both Win98 and 2K and I''m having problems when I transfer the program to 2K. The program adds the first child to the MDI parent fine, but any one after that returns 1407 (which is a Window Class not found error). I even tried reregistering the class after an error, but that returns the same thing. Any idea what might be causing this problem? Should I unregister the class after each window add and then reregister it when a "make new window" command comes in? I''m not even sure that will fix the problem! Anway, any help would be appreciated. btw, this is also not a Unicode / ASCII issue. I checked that.
-Warden
Advertisement
quote:Original post by Warden
Should I unregister the class after each window add and then reregister it when a "make new window" command comes in?

No. Register the child window class immediately after registering the main window.

quote:Original post by Warden
Any idea what might be causing this problem?

Could be a lot of things. Might be the child class, the clientcreatestruct or the mdicreatestruct. There''s a decent example for a MDI prog available from the faq at winprog.org. One thing to bear in mind between W98 and W2K, Edit controls max out at 64kb on W98. You''ll want to use a RichEdit control to get around that limitation.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Are you using MFC? How exactly are you adding these child windows to the parent window? This is pretty much done for you when you are using MFC...
ugh.. MFC is teh suck
daerid@gmail.com
It''s all pure Win32. None of that MFC garbage. I''ll take a look at the winprog.org stuff, but it looks like I''m doing it right (there''s a few style flags that are different and I''ll take a look). Right now the child windows don''t do anything, so I don''t think its a problem with the Edit controls like you said. I''ll look into it though. Thanks for the link. I''m sure it will help in the future.
-Warden
Cool. I wasn''t trying to suggest that edit controls were causing the problem, only pointing out a workaround to another hurdle you might soon face.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man

This topic is closed to new replies.

Advertisement