Archived

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

chris1234

dialog procedure

Recommended Posts

chris1234    122
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
S1CA    1418
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