WinDlgBox() Function

MYSTRUCT *MyStruct;
   :
DosAllocMem(MyStruct,                 /* Allocate memory object          */
            sizeof(MYSTRUCT),         /* Size of memory object           */
            PAG_READ  |               /* Allow read access               */
            PAG_WRITE |               /* Allow write access              */
            PAG_COMMIT);              /* Commit storage now              */

<Initialize values in MyStruct>       /* Set initialization data         */

rc = WinDlgBox(HWND_DESKTOP,          /* Desktop is parent               */
               hwnd,                  /* Current window is owner         */
               dpMyDialog,            /* Entry point of dialog procedure */
               (HMODULE)0,            /* Resource is in EXE file         */
               DC_MYDIALOG,           /* Dialog resource identifier      */
               MyStruct);             /* Pointer to initialization data  */


[Back: Subclass Window Procedure]
[Next: Communicating with a Control Window]