Thread: Passing parameters to modal dialogs

  1. #1
    Registered User
    Join Date
    Feb 2004
    Posts
    31

    Exclamation Passing parameters to modal dialogs

    Hey all,

    I was wondering how you guys cope with passing parameters when creating a modal dialog box.
    Since calling DialogBox() transfers focus to the modal dialog box there's no way to pass any additional parameters to it (apart from the obvious way of using globals ).

    Thanks!
    Parts of my days are spent bug fixing...err. I’m sorry...I’ve just been reminded that we don’t have bugs. We have undocumented features. (Jonathan Ackley on Monkey Island 3)

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    DialogBoxParam will allow you to pass a value to the WM_INITDIALOG message to the dialog. You could give it a pointer to a struct with all the info you wanna give.

  3. #3
    Registered User
    Join Date
    Feb 2004
    Posts
    31
    Hah, that just tells something about how bad my research was before asking

    Thanks a lot mate!
    Parts of my days are spent bug fixing...err. I’m sorry...I’ve just been reminded that we don’t have bugs. We have undocumented features. (Jonathan Ackley on Monkey Island 3)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newb Question on Passing Objects as Parameters
    By Mariano L Gappa in forum C++ Programming
    Replies: 12
    Last Post: 11-29-2006, 01:08 PM
  2. Replies: 7
    Last Post: 04-19-2006, 11:17 AM
  3. Question about passing & receiving parameters
    By TCB in forum C Programming
    Replies: 9
    Last Post: 04-11-2006, 06:08 AM
  4. Passing parameters from VB to C++ through ActiveX DLL
    By torbjorn in forum Windows Programming
    Replies: 0
    Last Post: 12-10-2002, 03:13 AM
  5. Passing Parameters
    By fry in forum C++ Programming
    Replies: 2
    Last Post: 10-04-2002, 03:06 AM