newntui/discovermdi/src/dockablebrowser.cpp
//---------------------------------------------------------------------------------
// This function will position dockable window sash bar to the sizable edge
// according to the window sizes and docking side.
//---------------------------------------------------------------------------------
This function will position dockable window sash bar to the sizable edge
according to the window sizes and docking side.
This function will position dockable window sash bar to the sizable edge according to the window sizes and docking side .
void CDockableBrowser::PositionSashBars() {
	m_sizeDefault.cx-=3;
	m_sizeDefault.cy-=3;
	   switch(GetDockSide()) {
	       case DOCK_LEFT : m_LeftSash.ShowWindow(SW_HIDE);
			                m_RightSash.ShowWindow(SW_SHOW);
						    m_TopSash.ShowWindow(SW_HIDE);
						    m_BottomSash.ShowWindow(SW_HIDE);
	                        m_RightSash.MoveWindow(m_sizeDefault.cx-5, 0, 6, m_sizeDefault.cy);
							m_RightSash.Invalidate();
							break;
	       case DOCK_RIGHT: m_LeftSash.ShowWindow(SW_SHOW);
			                m_RightSash.ShowWindow(SW_HIDE);
						    m_TopSash.ShowWindow(SW_HIDE);
						    m_BottomSash.ShowWindow(SW_HIDE);
	                        m_LeftSash.MoveWindow(1, 0, 6, m_sizeDefault.cy);
							m_LeftSash.Invalidate();
							break;
	       case DOCK_TOP :  m_LeftSash.ShowWindow(SW_HIDE);
			                m_RightSash.ShowWindow(SW_HIDE);
						    m_TopSash.ShowWindow(SW_HIDE);
						    m_BottomSash.ShowWindow(SW_SHOW);
	                        m_BottomSash.MoveWindow(0, m_sizeDefault.cy-5, m_sizeDefault.cx,6);
							m_BottomSash.Invalidate();
							break;
	       case DOCK_BOTTOM:m_LeftSash.ShowWindow(SW_HIDE);
			                m_RightSash.ShowWindow(SW_HIDE);
						    m_TopSash.ShowWindow(SW_SHOW);
						    m_BottomSash.ShowWindow(SW_HIDE);
	                        m_TopSash.MoveWindow(0, 1, m_sizeDefault.cx,6);
							m_TopSash.Invalidate();
							break;
	       case DOCK_FLOAT:m_LeftSash.ShowWindow(SW_HIDE);
			                m_RightSash.ShowWindow(SW_HIDE);
						    m_TopSash.ShowWindow(SW_HIDE);
						    m_BottomSash.ShowWindow(SW_HIDE);
							break;
	   }
	m_sizeDefault.cx+=3;
	m_sizeDefault.cy+=3;
}
void CDockableBrowser :: PositionSashBars ( ) { m_sizeDefault . cx -= 3 ; m_sizeDefault . cy -= 3 ; switch ( GetDockSide ( ) ) { case DOCK_LEFT : m_LeftSash . ShowWindow ( SW_HIDE ) ; m_RightSash . ShowWindow ( SW_SHOW ) ; m_TopSash . ShowWindow ( SW_HIDE ) ; m_BottomSash . ShowWindow ( SW_HIDE ) ; m_RightSash . MoveWindow ( m_sizeDefault . cx - 5 , 0 , 6 , m_sizeDefault . cy ) ; m_RightSash . Invalidate ( ) ; break ; case DOCK_RIGHT : m_LeftSash . ShowWindow ( SW_SHOW ) ; m_RightSash . ShowWindow ( SW_HIDE ) ; m_TopSash . ShowWindow ( SW_HIDE ) ; m_BottomSash . ShowWindow ( SW_HIDE ) ; m_LeftSash . MoveWindow ( 1 , 0 , 6 , m_sizeDefault . cy ) ; m_LeftSash . Invalidate ( ) ; break ; case DOCK_TOP : m_LeftSash . ShowWindow ( SW_HIDE ) ; m_RightSash . ShowWindow ( SW_HIDE ) ; m_TopSash . ShowWindow ( SW_HIDE ) ; m_BottomSash . ShowWindow ( SW_SHOW ) ; m_BottomSash . MoveWindow ( 0 , m_sizeDefault . cy - 5 , m_sizeDefault . cx , 6 ) ; m_BottomSash . Invalidate ( ) ; break ; case DOCK_BOTTOM : m_LeftSash . ShowWindow ( SW_HIDE ) ; m_RightSash . ShowWindow ( SW_HIDE ) ; m_TopSash . ShowWindow ( SW_SHOW ) ; m_BottomSash . ShowWindow ( SW_HIDE ) ; m_TopSash . MoveWindow ( 0 , 1 , m_sizeDefault . cx , 6 ) ; m_TopSash . Invalidate ( ) ; break ; case DOCK_FLOAT : m_LeftSash . ShowWindow ( SW_HIDE ) ; m_RightSash . ShowWindow ( SW_HIDE ) ; m_TopSash . ShowWindow ( SW_HIDE ) ; m_BottomSash . ShowWindow ( SW_HIDE ) ; break ; } m_sizeDefault . cx += 3 ; m_sizeDefault . cy += 3 ; }
This function will position dockable window sash bar to the sizable edge
according to the window sizes and docking side.
This function will position dockable window sash bar to the sizable edge according to the window sizes and docking side .