|
Owned Windows
An overlapped or pop-up window can be owned by another overlapped or pop-up
window. Being owned places several constraints on a window.
- An owned window is always above its owner in the Z order.
- Windows automatically destroys an owned window when its owner is destroyed.
- An owned window is hidden when its owner is minimized.
Only an overlapped or pop-up window can be an owner window; a child window
cannot be one. An application creates an owned window by specifying the owner's
window handle as the hwndParent parameter of CreateWindowEx when it creates a window with the WS_OVERLAPPED or WS_POPUP style. The hwndParent parameter must identify an overlapped or pop-up window. If hwndParent identifies a child window, Windows assigns ownership to the top-level parent
window of the child window. After creating an owned window, an application
cannot transfer ownership of the window to another window.
Dialog boxes and message boxes are owned windows by default. An application
specifies the owner window when calling a function that creates a dialog box or
message box.
An application can use the GetWindow function with the GW_OWNER flag to retrieve the handle of a window's owner.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|