This example uses the WinShowWindow call to make a modeless dialog window visible.

#define INCL_WINWINDOWMGR
#define INCL_WINDIALOGS
#include <OS2.H>
#define DLG_MODELESS 900
          /* dialog procedure declaration. */
MRESULT EXPENTRY DlgProc( HWND hwndDlg, ULONG msg, MPARAM mp1, MPARAM mp2 );
HWND hwnd;

  hwnd = WinLoadDlg( HWND_DESKTOP,
                    HWND_OBJECT,
                    (PFNWP)DlgProc,
                    (HMODULE)NULL,
                    DLG_MODELESS,
                    NULL);

/*
DlgProc( HWND hwndDlg, ULONG msg, MPARAM mp1,
                                  MPARAM mp2 )
{
CASE USER_DEFINED:

*/
      WinShowWindow( hwnd,
                     TRUE );     /* show window. */
      WinSetFocus( HWND_DESKTOP, hwnd );
}


[Back] [Next]