CDocker

Win32++

CDocker Class

Description

The CDocker class adds both docking and splitter windows to the Win32++ framework. Splitter windows have a subset of the functionality of docking windows. Splitter windows are child windows that can be dynamically re-sized. Docking windows have this feature too, but they also allow windows to be docked and undocked.

CDocker Members

CDocker
CDocker();
Constructor for CDocker.
AddDockedChild
virtual CDocker* AddDockedChild(CDocker* pDocker, DWORD dwDockStyle, 
                                int DockWidth, int nDockID = 0);
Adds the specified Docker as a docked child. AddUndockedChild
virtual CDocker* AddUndockedChild(CDocker* pDocker, DWORD dwDockStyle, 
                                  int DockWidth, RECT rc, int nDockID = 0);
Adds the specified Docker as an undocked member of this docking group. Close
virtual void Close();
Closes the Docker. CloseAllDockers
virtual void CloseAllDockers();
Closes all Dock children. Dock
virtual void Dock(CDocker* pDocker, UINT uDockSide);
Docks the Docker to the side of another Docker. DockInContainer
virtual void DockInContainer(CDocker* pDock, DWORD dwDockStyle);
Docks the Container inside another Container (by adding a tab). GetActiveDocker
virtual CDocker* GetActiveDocker() const;
Returns the docker whose child window has focus. GetAllDockers
std::vector <CDocker*> * GetAllDockers() const;
Returns a pointer to the vector containing pointers to all Dockers in this docking group. GetBarWidth
int GetBarWidth() const;
Returns the width of the Docker's splitter bar. GetCaption
CString& GetCaption() const;
Returns the Docker's caption text. GetContainer
virtual CDockContainer* GetContainer() const;
Returns a pointer to the container used as the Docker's view.  If the view is not a container, this function returns NULL. GetDockAncestor
virtual CDocker* GetDockAncestor() const;
Returns a pointer to the Dock Ancestor of this docking group. GetDockBar
virtual CDockBar* GetDockBar() const;
Returns a pointer to this docker's splitter bar. GetDockChildren
std::vector <CDocker*> * GetDockChildren() const;
Returns a pointer to the vector containing pointers to all of this docker's dock children. GetDockClient
virtual CDockClient* GetDockClient() const;
Returns a pointer to the Window of this docker's client area. The dock caption an view window are child windows of the dock client. GetDockFromID
virtual CDocker* GetDockFromID(int n_DockID) const;
Returns a pointer to the docker, given its ID. GetDockFromPoint
virtual CDocker* GetDockFromPoint(POINT pt) const;
Returns a pointer to the Docker whose Dock client area includes the specified point . GetDockFromView
virtual CDocker* GetDockFromView(CWnd* pView) const;
Returns a pointer to the Docker which has the the specified view window. GetDockHint
virtual CDockHint* GetDockHint() const;
Returns a pointer to the Docker's hint window. The hint window as a blue tint and is displayed during dock dragging.  GetDockID
int GetDockID() const;
Return the ID of this Docker. GetDockParent
CDocker* GetDockParent() const;
Returns the Dock Parent of this Docker. GetDockStyle
DWORD GetDockStyle() const;
Returns the dock style of this Docker. GetDockWidth
virtual int GetDockWidth() const;
Returns the width of a docker which is dock to the left or right of another docker, or its height if docked to the top or bottom. GetTabbedMDI
virtual CTabbedMDI* GetTabbedMDI() const;
Returns a TabbedMDI pointer to the view window of this docker, or NULL if the view window is not a TabbedMDI. GetTopmostDocker
virtual CDocker* GetTopmostDocker() const;
Returns the top level Dock parent of this Docker.  Any undocked Docker (not just the Dock Ancestor) can be a top level Dock parent. GetView
CWnd* GetView() const;
Returns a pointer to the view window of this docker. GetViewRect
virtual CRect GetViewRect() const;
Returns a CRect containing the dimensions of the view window. Hide
virtual void Hide();
Undocks the Docker (if necessary) and hides it. IsChildOfDocker
BOOL IsChildOfDocker(HWND hwnd) const;
Returns TRUE if the specified window handle is a decendant of this docker. IsDocked
BOOL IsDocked() const;
Returns TRUE if this Docker is docked within another Docker. IsDragAutoResize
BOOL IsDragAutoResize() const;
Returns the TRUE of the dockers will be automatically re-arrange as the splitter bar is moved. IsRelated
BOOL IsRelated(HWND hWnd) const;
Returns TRUE if the specified Docker is in this docker family. Dockers in the same dock family share the one dock ancestor. IsUndocked
BOOL IsUndocked() const;
Returns TRUE if the docker is Undocked. The dock ancestor is always undocked, but other dockers can dock within it. LoadDockRegistrySettings
virtual BOOL LoadDockRegistrySettings(LPCTSTR szRegistryKeyName);
Adds dockers to the dock ancestor according to the docking information stored in the registry. RecalcDockLayout
virtual void RecalcDockLayout();
Recalculates and repositions all dockers which are dock decendants of this docker's top level dock parent. SaveDockRegistrySettings
virtual BOOL SaveDockRegistrySettings(LPCTSTR szRegistryKeyName);
Saves the docking styles, state and position in the registry. SetBarColor
void SetBarColor(COLORREF color);
Sets the color of the splitter bar. SetBarWidth
void SetBarWidth(int nWidth);
Sets the width of the splitter. SetCaption
void SetCaption(LPCTSTR szCaption);
Sets the dock caption text. SetCaptionColors
vvoid SetCaptionColors(COLORREF Foregnd1, COLORREF Backgnd1, COLORREF ForeGnd2, COLORREF BackGnd2);
Sets the caption's foreground and background colours. SetCaptionHeight
void SetCaptionHeight(int nHeight);
Sets the caption's height. SetDockStyle
void SetDockStyle(DWORD dwDockStyle);
Set the dock style. SetDockWidth
void SetDockWidth(int DockWidth);
Sets the width of a docker docked to the left or right of its parent, or the height of the docker docked to the top or bottom. SetDragAutoResize
void SetDragAutoResize(BOOL bAutoResize);
Set the DragAutoSize mode. When TRUE, dockers will be automatically re-arranged as the splitter bar is moved. When FALSE the dockers will be re-arranged when the splitter bar dragging is complete. SetView
void SetView(CWnd& wndView);
Sets the view window for the docker. Undock
virtual void Undock(CPoint pt, BOOL bShowUndocked = TRUE);
Undocks the Docker and positions it at the specified point. UndockContainer
virtual void UndockContainer(CDockContainer* pContainer, 
                             CPoint pt, BOOL bShowUndocked);
Undocks the Container and positions it at the specified point. VerifyDockers
virtual BOOL VerifyDockers();
A built in diagnostic which verifies the integrity of the docking hierarchy.

Overridables

NewDockerFromID
virtual CDocker* NewDockerFromID(int idDock);
Override this function to create a new Docker given its docker ID.
OnActivate
virtual void OnActivate(WPARAM wParam, LPARAM lParam);
Called when the window is activated or deactivated.
OnBarEnd
virtual LRESULT OnBarEnd(LPDRAGPOS pdp);
Called when the repositioning of the splitter bar is complete.
OnBarMove
virtual LRESULT OnBarMove(LPDRAGPOS pdp);
Called when the splitter bar is moved.
OnBarStart
virtual LRESULT OnBarStart(LPDRAGPOS pdp);
Called when the splitter bar is about to be repositioned.
OnCreate
virtual void OnCreate();
Called when the window is created.
OnDestroy
virtual void OnDestroy(WPARAM wParam, LPARAM lParam);
Called when the window is destroyed.
OnDockActivated
virtual LRESULT OnDockActivated(WPARAM wParam, LPARAM lParam);
Called when a docker is activated or deactivated.
OnDockDestroyed
virtual void OnDockDestroyed(WPARAM wParam, LPARAM lParam);
Called when the docker is destroyed.
OnDockEnd
virtual LRESULT OnDockEnd(LPDRAGPOS pdp);
Called when docker has been docked.
OnDockMove
virtual LRESULT OnDockMove(LPDRAGPOS pdp);
Called when an undocked docker is being moved.
OnDockSetFocus
virtual LRESULT OnDockSetFocus();
Called when a child docker gets focus.
OnDockStart
virtual LRESULT OnDockStart(LPDRAGPOS pdp);
Called when undocking is about to start.
OnExitSizeMove
virtual void OnExitSizeMove(WPARAM wParam, LPARAM lParam);
Called after the window has completed a resize or move.
OnNotify
virtual LRESULT OnNotify(WPARAM wParam, LPARAM lParam);
Called when the window receives a notification.
OnNCLButtonDblClk
virtual LRESULT OnNCLButtonDblClk(WPARAM wParam, LPARAM lParam);
Called when the non-client area recieves a left button double click.
OnSysColorChange
virtual void OnSysColorChange(WPARAM wParam, LPARAM lParam);
Called when a change is made to a system color setting.
OnSysCommand
virtual LRESULT OnSysCommand(WPARAM wParam, LPARAM lParam);
Called when the window is minimized, maximized, restored or closed.
OnTimer
virtual LRESULT OnTimer(WPARAM wParam, LPARAM lParam);
Called when the timer has expired.
OnWindowPosChanged
virtual void OnWindowPosChanged(WPARAM wParam, LPARAM lParam);
Called after the window position has changed.
OnWindowPosChanging
virtual LRESULT OnWindowPosChanging(WPARAM wParam, LPARAM lParam);
Called before the window position has changed.
PreCreate
virtual void PreCreate(CREATESTRUCT &cs);
Sets the window creation parameters.
PreRegisterClass
virtual void PreRegisterClass(WNDCLASS &wc);
Sets the window class parameters.
PreTranslateMessage
virtual BOOL PreTranslateMessage(MSG Msg);
This functions is called by the MessageLoop. It processes the keyboard accelerator keys and calls CWnd::PreTranslateMessage for keyboard and mouse events.
Base class Members

For base class members, refer to the members of CWnd.

Remarks

Refer to the Docking section for information on how to use CDocker to create splitter windows and docking windows.

Summary Information

Header file docking.h
Win32/64 support Yes
WinCE support Yes