Passing parameters to modal dialogs

This is a discussion on Passing parameters to modal dialogs within the Windows Programming forums, part of the Platform Specific Boards category; Hey all, I was wondering how you guys cope with passing parameters when creating a modal dialog box. Since calling ...

  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,266
    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, 12:17 PM
  3. Question about passing & receiving parameters
    By TCB in forum C Programming
    Replies: 9
    Last Post: 04-11-2006, 07: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, 04:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21