An application can retrieve a frame-control handle by using WinWindowFromID. The following code fragment retrieves the handle of a title-bar control:
HWND hwndTitleBar,hwndFrame; hwndTitleBar = WinWindowFromID(hwndFrame, FID_TITLEBAR);
Given a frame-control handle, an application can retrieve its parent frame-window handle by using WinQueryWindow:
HWND hwndFrame,hwndTitleBar; hwndFrame = WinQueryWindow(hwndTitleBar, QW_PARENT);
By using identifiers to identify frame controls, rather than using window classes, an application can create its own controls to replace the predefined controls.