BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Common Forums
 MFC Programming
 CDialog::Create never returns
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aphillips

39 Posts

Posted - 03/24/2004 :  10:15:34 PM  Show Profile  Visit aphillips's Homepage  Reply with Quote
I have a modeless property sheet that worked perfectly (under all of 95/98/ME/NT/2K/XP), but I wanted to make this dockable. I also have several modeless dialogs that I wanted to make dockable, so for simplicity I wanted to create a class derived from CBCGDialogBar which would act as the base class for all my dockable windows.

Hence the first step was to convert my modeless CPropertySheet to a modeless CDialog. I just did this by creating a CDialog and placing the property sheet as a child window in it (and resizing when it resizes). This worked fine under Windows 2000/XP so I went ahead and changed the derived class from CDialog to (a class derived from) CBCGDialogBar. With a lot of work it all worked fine under Windows 2000 and XP.

Then about a month later I discovered it fails miserably under Windows 95/98/ME.

I went back to my first step (property sheet in modeless CDialog) and even that fails under 9X. The call to CDialog::Create never returns. I stepped through the MFC code down to a call to API function CreateDialogIndirect which never returns. If I break I can see that there are various window messages being passed around (WM_SETCURSOR etc) but nothing ever gets drawn (obviously since CreateDialogIndirect never returns).

I think this is something that MFC is doing but I can't work it out. I also don't want to make major changes as I have spent a lot of time refining it as it is (under 2000).

What is going wrong here and how do I fix it?

http:://www.hexedit.com
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
BCGSoft Forums © Copyright (c) 1998-2022 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000