![](smile.gif)
Dialog box problems
Yeah, it''s me again with a new win32 problem...
Allright, I''m using the win32 api and have a problem with dialog boxes. I make a dialogbox template, or whatever ther are called, with the dialog editor in VC 6.0. Then, I use CreateDialog() and ShowWindow the show it. The problem is that some things doesnt work with this dialog. For example, ALT+F4 dont work, and you can''t close the window by clicking the X in the right corner. All this works if I use DialogBox() to show the window, but I need to use CreateDialog() since that returns the handle to the window.
Thanks...
![](smile.gif)
-----------------------------Reporter: Are they slow-moving, chief?Sheriff: Yeah, they're dead. They're all messed up.-Night of the living dead
In other words, watch for a WM_CLOSE to be passed to your dialog, and call EndDialog() when you get that message. But just so you know, the difference between DialogBox() and CreateDialog() is different than just the return value. The former creates a modal dialog box, and the latter creates a modeless box, so they are going to behave differently. If you need the window handle for a modal dialog box, you don''t have to get it from the call to DialogBox(). When the WM_INITDIALOG message comes through, which is right after you create the box, you can get the window handle there since it will be one of the parameters that''s passed to your dialog handling function.
-Ironblayde
Aeon Software
Down with Tiberia!![](http://www.aeon-software.com/misc/notiberia.gif)
"All your women are belong to me." - Nekrophidius
-Ironblayde
Aeon Software
![](http://www.aeon-software.com/misc/notiberia.gif)
![](http://www.aeon-software.com/misc/notiberia.gif)
"All your women are belong to me." - Nekrophidius
![](http://www.aeon-software.com/temp/resist.png)
"Your superior intellect is no match for our puny weapons!"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement