vc++ dialogs
how do i initialize a dialog box i mean to use as modal? "Create" doesn''t seem to work (i need it to load the resource dbox), and msdn doesn''t say anything else.
Thanks in advance!
Basically what you need to do is instantiate an object from CDialog and then attach your resource dialog to your newly created object. (I assume you are using the resouce editor to make the dialog)
Then after it has been instantiated and resource is attached you would call DoModal() and do your thing what have you. Also I''ll point out this potential pitfall, when you instantiate the dialog, make sure it isn''t from a local function that goes out of scope before you can do anything with it.
BTW, I am assuming this is a dynamic dialog box judging from your post, if not then the same basic rules apply only not.
Then after it has been instantiated and resource is attached you would call DoModal() and do your thing what have you. Also I''ll point out this potential pitfall, when you instantiate the dialog, make sure it isn''t from a local function that goes out of scope before you can do anything with it.
BTW, I am assuming this is a dynamic dialog box judging from your post, if not then the same basic rules apply only not.
~deadlinegrunt
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement