Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>show dialog</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SHOW DIALOG
Show a dialog
------------------------------------------------------------------------------

Syntax
#include "windows.ch"
#include "topclass.ch"   --or--   #define  NO_C4WCLASS
#include "commands.ch"
SHOW DIALOG <oDlg> | <aDlg>
     [ MODELESS ]
     [ ON INIT <InitFunc> ]
     [ IN  [ DIALOG | WINDOW ] <oParent> ]
     [ RESULT <nh> ]

Arguments
<oDlg> | <aDlg> specifies the variable identifying either the
dialog object (if OO) or a dialog structure (an array) (if
NO_C4WCLASS is defined).

MODELESS specifies a modeless (non-modal) dialog.  For an OO
application, this is the default.

ON INIT <InitFunc> specifies a code block to be evaluated or a
function to be called when the dialog has been created but not
yet displayed (i.e. when the WM_INITDIALOG message is sent to
the dialog).

IN [ DIALOG | WINDOW ] <oParent>  specifies the parent (owner)
of the dialog.

RESULT <nh> specifies a variable to receive either the numeric
result (for a modal dialog) or the dialog handle (if MODELESS
is specified).

Description
This command can be used to display a dialog in either a non-
OO application (by defining NO_C4WCLASS) or an OO application.

Example
// From source\vbxdemo2.prg:
CREATE DIALOG oDlg RESOURCE "VBXDemoDlg" VBX

@ ID IDC_SPIN1 VBX IN oDlg                                             ;
    ON SpinUp   {|hDlg| SetDlgItemText(hDlg, IDC_VALUE, str(++nSpin))} ;
    ON SpinDown {|hDlg| SetDlgItemText(hDlg, IDC_VALUE, str(--nSpin))}

@ ID IDC_CHANGE_ORIENTATION BUTTON ChangeOrientation IN oDlg

@ ID IDC_VALUE SAY str(nSpin) IN oDlg

SHOW DIALOG oDlg IN oWnd


See Also: @ ID CREATE DIALOG

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