Idle in a Dialog Box? [MFC]
For my current project I need to create a loading dialog.
Thing is I need to create a dialog that will display.. then have a function called... then quit..
I find out how to do this.. Anyone have any ideas?
------------------------------------------------------------I wrote the best video game ever, then I woke up...
You just create a dialog resource, wap ctrl-w make a new dialog class, and include the header file in your main app. Add the function you want to the new dialog class.
The trick is you need to creat a "modeless" dialog, and instead of calling .DoModal you just call .Show(SW_SHOW) and then the main program will launch. Once that happens you whack the dialog.
Magmai Kai Holmlor
- Not For Rent
The trick is you need to creat a "modeless" dialog, and instead of calling .DoModal you just call .Show(SW_SHOW) and then the main program will launch. Once that happens you whack the dialog.
Magmai Kai Holmlor
- Not For Rent
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Well, now I have a Assertion Error..
Assert Failed
::IsWindow(m_hWnd)
I can't figure it out..
Edited by - Galileo430 on July 24, 2001 2:07:23 PM
Assert Failed
::IsWindow(m_hWnd)
I can't figure it out..
Edited by - Galileo430 on July 24, 2001 2:07:23 PM
------------------------------------------------------------I wrote the best video game ever, then I woke up...
Did you create your dialog before calling Show()? if IsWindow fails, it oftn means the object either was never created or has gone out of scope.
Actually, backing up to your first post, you want to create a "Loading..." dialog box, no? You want it to quit after the function returns, right? Perhaps the dialog is being destroyed before the function ends (depends on how you call the function - inside the dialog?), and your reference to the dialog object after that is to an invalid object. Try this:
Hope it helps.
Edited by - Oluseyi on July 24, 2001 2:34:36 PM
Actually, backing up to your first post, you want to create a "Loading..." dialog box, no? You want it to quit after the function returns, right? Perhaps the dialog is being destroyed before the function ends (depends on how you call the function - inside the dialog?), and your reference to the dialog object after that is to an invalid object. Try this:
|
Hope it helps.
Edited by - Oluseyi on July 24, 2001 2:34:36 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement