- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a little problem concerning a modeless dialogthat I use to host some controls.
The dialog is created via CreateDialogParam in the WM_CREATE part of my main window and is shown permanently. Everything works fine on the computer I write the application on, but when I start the executable on another machine, the dialog does not show. My log file shows me that no handle is returned from the CreateDialogParam routine (handle=0), but the LastError functions returns zero as well.
I tried this on two different machines (one WinXP pro, one Win XP). I also compiled the whole project one the laptop of someone elsewith the same versionof compiler(9.0.2713) VS.net (2003), and again the dialog doesn't show there.Still, everything is fine on my machine. Has anybody an idea what might be wrong here? Below you find the WM_CREATE part of my main window.
CASE (WM_CREATE)
OPEN(9,FILE='logfile.log',TYPE='REPLACE')
WRITE (9,'(A)') '(WM_CREATE) Create main window'
CALL InitOGlVars
! Show control dialog
ghDlgCtrl = CreateDialogParam(ghInstance,IDD_DLG_CTRL,hWnd,
LOC(CtrlDlgProc),0)ret=GetLastError()
WRITE (9,*) ' CreateDialog (Handle,Err): ',ghDlgCtrl,retret=ShowWindow(ghDlgCtrl, SW_SHOW)
WRITE (9,*) ' ShowDialog (ret): ',retret=GetLastError()
WRITE (9,*) ' ShowDialog (Err): ',ret ! Show OGl (child) windowret=GetClientRect(ghWndMain,rect)
ghwndChild = CreateWindowEx( 0,lpszCClassName, &
lpszCAppName, &
INT( WS_CHILD+WS_DLGFRAME+ &WS_CLIPCHILDREN), &
widthDlgCtrl, &
0, &
widthOGl, &
heightOGl, &
hWnd, &
chWndID, &
NULL )
ret=ShowWindow(ghWndChild, SW_SHOW)
ret=GetDesktopWindow()
CALL CenterWindow (hwnd, ret)
MainWndProc = 0
RETURN
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Damn, you're good. I have an updown control, and didn't realize that it had to be registered first. Everything works fine now, thanks a lot.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page