newntui/discovermdi/src/dockablebrowser.cpp
//---------------------------------------------------------------------------------
// This function will calculate fixed size of the dockable window.
// (This dimention depends only from the frame size)
//---------------------------------------------------------------------------------
This function will calculate fixed size of the dockable window.
(This dimention depends only from the frame size)
This function will calculate fixed size of the dockable window . ( This dimention depends only from the frame size )
void CDockableBrowser::CalculateFixedSize() {
CRect frameRect;
       GetParent()->GetWindowRect(&frameRect); 
	   int xlen = 1024;
	   int ylen = 768;
	   CDC* dc = GetWindowDC();
	   if(dc) {
	       int xlen = dc->GetDeviceCaps(HORZRES);
	       int ylen = dc->GetDeviceCaps(HORZRES);
	   }
	   switch(GetDockSide()) {
	       case DOCK_LEFT : m_sizeDefault.cx=xlen/3;
			                break;
	       case DOCK_RIGHT: m_sizeDefault.cx=xlen/3;
			                break;
	       case DOCK_TOP :  m_sizeDefault.cy=ylen/3;
			                break;
	       case DOCK_BOTTOM:m_sizeDefault.cy=ylen/3;
			                break;
	   }
	   m_ProjectSplitterX=m_sizeDefault.cx/2;
	   m_QuerySplitterX=m_sizeDefault.cx/2;
}
void CDockableBrowser :: CalculateFixedSize ( ) { CRect frameRect ; GetParent ( ) -> GetWindowRect ( & frameRect ) ; int xlen = 1024 ; int ylen = 768 ; CDC * dc = GetWindowDC ( ) ; if ( dc ) { int xlen = dc -> GetDeviceCaps ( HORZRES ) ; int ylen = dc -> GetDeviceCaps ( HORZRES ) ; } switch ( GetDockSide ( ) ) { case DOCK_LEFT : m_sizeDefault . cx = xlen / 3 ; break ; case DOCK_RIGHT : m_sizeDefault . cx = xlen / 3 ; break ; case DOCK_TOP : m_sizeDefault . cy = ylen / 3 ; break ; case DOCK_BOTTOM : m_sizeDefault . cy = ylen / 3 ; break ; } m_ProjectSplitterX = m_sizeDefault . cx / 2 ; m_QuerySplitterX = m_sizeDefault . cx / 2 ; }
This function will calculate fixed size of the dockable window.
This function will calculate fixed size of the dockable window .