Archived

This topic is now archived and is closed to further replies.

Warden

MDI Window Problem in Win2K

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites