Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- M E W E L - <b>int pascal dialogbox(hdlg hdlg)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
int pascal DialogBox(HDLG hDlg)

  This function displays a dialog box, and waits for the user to exit
the dialog box before returning control to the calling application.
This kind of dialog box is called a 'modal' dialog box.

  Before the dialog box is first displayed, DialogBox() will call the
user specified callback function with the message WM_INITDIALOG. This
will give the user the opportunity to initialize some of the dialog
box controls before the dialog box is actually displayed, such as
filling in the default text for the various edit fields

  DialogBox() will disable all of the windows that are defined. This
means that you cannot even click on the menubar while you are in a
modal dialog box. DialogBox() will display the dialog box, and then
goes into a loop where it reads all system messages. For all messages
meant for the dialog box, the default dialog box procedure is called.

  The default dialog box procedure will first call the user-defined
callback function with the message and the two parameters, wParam and
lParam. If the callback function does not want to process the
message, it should return FALSE, or else it should return TRUE. The
dialog box procedure examines the return value from the callback
function, and if it's FALSE, will attempt to process the message on
its own.

  The callback function must have the following form:
       int pascal dlgfunc(HDLG hDlg, WORD message, WORD wParam, DWORD
                           lParam)

  The dialog box manager is responsible for controlling movement
between the various controls in the dialog box. It processes all of
the WM_CHAR messages which your dialog box function does not process,
and depending on what the key is, will move between the various
controls, accept or dismiss the dialog box, or ignore the keystroke.
In order to determine how to move between the controls, it sends the
controls a WM_GETDLGCODE message. Please see the section on messages
for more information about WM_GETDLGCODE.

Parameters
  hDlg is the handle to the dialog box to be displayed.

Returns
  The result passed to the EndDialog() function will be returned.

See Also: DialogCreate _DialogBox()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson