Jump to content
  • Advertisement
Sign in to follow this  
peter_b

Custom dialog apperance.

This topic is 4670 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I have some questions about customizing a dialog's apperance during runtime. Im using wtl, but if you know how to do this in win32 or mfc, please tell me, i can probebly figure it out from that. q1: Is it possible to add control's to a dialog (CDialogImpl) by calling Create() for the control on INITDIALOG? Iv tried but it just dosn't show up. No error or anything. Is this possible? Or can you only use controll's that have been added by the resource editor? q2: if this isn't possible. How do i create a window that is a child of the main frame, but appears as a dialog? Ie something equal to DoModal() to pop it up. I need a way to genereate the apperance of a dialog depending on what data i have. I cannot pre-make it in the resource editor. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Have a look at this article on MSDN, specifically the "Creating a Template in Memory" section. Building the template is fairly straightforward once you know what controls are needed on the dialog. You can look at a sample .rc file from the resource editor to see what sort of flags and parameters are useful in the template.

There's probably an easier or cleaner way to do this, so I'd suggest Googling around for some of the functions and structures listed in that sample to see if anyone has some prefab wrapper code that you could use.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!