WM_SYSCOMMANDEX
You can use the WM_SYSCOMMANDEX message in your CView class to allow the CView to modify its docking state programmatically. The CView sends this message to its current parent frame. The following code sends a message to the view’s parent frame.
using namespace nsSysCommandEx;
ScxInfo si(GetParentFrame()->m_hWnd);
si.m_dw[0]=SCXID_DOCKRIGHT;
GetParentFrame()->SendMessage(WM_SYSCOMMANDEX,
SCX_NEWFRAME,(LPARAM)si);
The following SCXID parameters are available and defined in <stingray-installdir>\Include\Toolkit\syscmdex.h.
SCXID Parameters
|
SCXID parameter |
Description |
|
|
Float the view as an MDI child. |
|
|
Minimize the view as an MDI child. |
|
|
Maximize the view as an MDI child. |
|
|
Restore the view as an MDI child. |
|
|
Dock the view in the next docking position on the main frame. |
|
|
Dock the view on the left side of the main frame. |
|
|
Dock the view on the top of the main frame. |
|
|
Dock the view on the right side of the main frame. |
|
|
Dock the view on the bottom of the main frame. |
|
|
Float the view outside the main frame. |