dialog procedure
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
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement