🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

vc++ dialogs

Started by
0 comments, last by AlexM 24 years, 5 months ago
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!
Advertisement
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.

~deadlinegrunt

This topic is closed to new replies.

Advertisement