- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am writing QuickWin console application and cannot figure out how to get the window handle of my main (modeless) dialog box (which I call IDD_DIALOG1). I know how the get the handle for dialog controls (e.g. hWnd=GetWindowItem(dlg%hWnd,IDC_CONTROL)), but not for the main window.
I want this handle for when I launch a pop-up modal dialog box (from the main program - not from a callback routine), using reti=dlgmodalwithparent(dlg2,hWndParent), where hWndParent is the handle to my main dialog box. I want to do this so my main dialog box will be disabled while the new dialog is displayed.
Any help will be appreciated.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GETHWNDQQ (W*S)
QuickWin Function: Converts a window unit number into a Windows* handle.
Module
USE IFQWIN
result = GETHWNDQQ (unit)
unit |
(Input) INTEGER(4). The window unit number. If unit is set to QWIN$FRAMEWINDOW (defined in IFQWIN.F90), the handle of the frame window is returned. |
Results
The result type is INTEGER(4) on IA-32 architecture; INTEGER(8) on Intel® 64 architecture. The result is a true Windows handle to the window. If unit is not open, it returns -1 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, App4619.
And thanks for setting me straight on getting the main dialog handle for a Console Application (the handle is simply dlg%hWnd, where dlg refers to the main dialog. Then use reti=dlgmodalwithparent(dlg2,dlg%hWnd) when launching the child dialog).
Everything is working great, now.

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