- //
- // We can use extended styles for custom default user config params
- // These can be processed in the dialog proc's WM_INITDLG
- // Dialog template is defined by vId and should be loaded from the
- // resource file in the current .exe
- //
- PDLGTEMPLATE pDlgt;
-
- ::DosGetResource(0L, RT_DIALOG, vId, (PPVOID)&pDlgt);
- m_hWnd = (WXHWND)::WinCreateDlg( hParent
- ,NULLHANDLE
- ,(PFNWP)wxDlgProc
- ,pDlgt
- ,(PVOID)&dwExtendedStyle
- );
- if (m_hWnd == 0)
- {
- vError = ::WinGetLastError(vHabmain);
- sError = wxPMErrorToStr(vError);
- wxLogError("Can't find dummy dialog template!\n"
- "Check resource include path for finding wx.rc.\n"
- "Error: %s\n", sError);
- return FALSE;
- }
-
- //
- // Move the dialog to its initial position without forcing repainting
- //
- if (!::WinSetWindowPos( m_hWnd
- ,HWND_TOP
- ,nX1
- ,nY1
- ,nWidth1
- ,nHeight1
- ,SWP_MOVE | SWP_SIZE | SWP_NOREDRAW
- ));
- {
- vError = ::WinGetLastError(vHabmain);
- sError = wxPMErrorToStr(vError);
- wxLogError("MoveWindow, error: %s\n", sError);
- }