Skip to main content
GameDev.net gamedev.net
🔒 Locked

dialog procedure

Started by chris1234 Dec 9, 2001 at 2:45 PM 0 replies 350+ views
Original Post
chris1234
chris1234
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
S1CA
S1CA
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
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.