Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

chris1234

dialog procedure

This topic is 6065 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

In my application (windowed game) I have multiple dialogs but all dialogs use the same dialogproc but on initialization of the dialog (WM_INITDIALOG) I want to use different initialization stuff for every dialog....so how can I indentify what dialog is being/going to be display when I''m in my (WM_INITDIALOG part of y dialogproc? thanks in advance... Chris

Share this post


Link to post
Share on other sites
Advertisement
1. Use DialogBoxParam() or similar to create the dialog boxes. This way you can create each one with a unique value. The lParam you get when you recieve the WM_INITDIALOG message will be the parameter you passed to DialogBoxParam.

2. If you''re constructing the dialog box manually you should have the HWND around from creation time, you can compare this to the HWND your dialog proc gets. You can also do this with SetWindowLong() [we use SetWindowLong to associate a "this" pointer with the window].

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites

  • 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!