Microsoft KB Archive/70079

{|
 * width="100%"|

HOWTO: Use MoveWindow to Move an Iconic MDI Child and Its Title

 * }

Q70079

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), used with:
 * Microsoft Windows NT Server versions 3.5, 3.51
 * Microsoft Windows NT Workstation versions 3.5, 3.51
 * the operating system: Microsoft Windows 2000
 * Microsoft Windows Software Development Kit (SDK) versions 3.0, 3.1

-

SUMMARY
Although Windows does not have application programming interface (API) calls to support dragging iconic windows (windows represented by an icon), calls to MoveWindow can be used to implement a dragging functionality for iconic multiple-document interface (MDI) child windows.

However, the icon's title is not in the same window as the icon, so when the icon is moved, the title will not automatically move with it. The title is in a small window of its own, so a separate call to MoveWindow must be made to place the title window correctly below the icon.

The information below describes how to get the window handle for the small title window, so that the appropriate call to MoveWindow can be made.

The icon's title window is a window of class #32772. This window is a child of the MDI client window, and its owner is the icon window.

To get the window handle to the appropriate icon title window for a given icon, enumerate all the children of the MDI client window, looking for a window whose owner is the icon.

You can use EnumChildWindows to loop through all the children of the MDI client window.

You can use GetWindow(..., GW_OWNER) to check the parent of each window.

Additional query words:

Keywords : kbIcon kbMDI kbOSWinNT310 kbOSWinNT350 kbOSWinNT351 kbOSWin2000 kbSDKWin32 kbGrpDSUser kbOSWin310 kbWndw kbOSWin300

Issue type : kbhowto

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch