hParent will automatically be disabled when used as the owner of a modal dialog, and made available again only when the modal dialog has been dismissed.
That's the easy way to force the user to stay off one screen until he has completed work on another. It's kind of like a "two screen wizard."
Announcement
Collapse
No announcement yet.
hParent question
Collapse
X
-
What is the value of firstDlg to the secondary dialog. It is not available to the secondary
dialog without making it a global or am I missing something.
[/quote]
It changes the relationship between the two dialogs. The second dialog is owned by the first
dialog and will always appear above its owner(the first dialog).
The handle of the owner is obtained as follows:
Code:firstDlg = GetWindow(secondDlg, %GW_OWNER)
Code:firstDlg = GetParent(secondDlg)
Code:firstDlg = GetWindowLong(secondDlg, %GWL_HWNDPARENT)
return the handle of the parent, or the owner, or null depending on the window styles(WS_XXX) of the
window being checked.Last edited by Dominic Mitchell; 13 Oct 2009, 07:36 PM.
Leave a comment:
-
-
hParent question
I am not sure I understand the importance of hParent in relation to it's parent dialog. If I create a main dialog like this,
DIALOG NEW hParent,"Main",0,0,100,100 TO firstDlg
and then create a secondary dialog which is called from the 'Main' dialog like this,
DIALOG NEW firstDlg,"Secondary",0,0,100,100 TO secondDlg
What is the value of firstDlg to the secondary dialog. It is not available to the secondary dialog without making it a global or am I missing something.
David Hoff JrTags: None
-
Leave a comment: