<< Return to Main Index

< Return to Class Index

CGXSplitterWnd::m_apInsideWndState

CGXInsideWndState*m_apInsideWndState[4];

Remarks

An array with 4 docked windows. Window can be docked at the left and right side of the horizontal scrollbar and at the bottom and top side of the vertical scrollbar:

Each member in this array is a pointer to a CGXInsideWndState structure:

struct CGXInsideWndState
{
   CGXInsideWndState();
   ~CGXInsideWndState();

   CWnd*   pWnd;
   int     nAlign;
   CSize   size;
   CSize   sizeMin;
   CSize   sizeBox;
   BOOL   bResizable;
   long   lRelSize;

   // will be assigned in RecalcLayout
   CRect   rectWnd;
   CRect   rectBox;
   CSize   sizeMax;
};

wheras

Example:

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
   // use the new record info wnd with support for dynamic splitter views
   m_pWndSplitter = new CGXRecordInfoSplitterWnd;

   if (!m_pWndSplitter->Create( this,
      2, 2,                 // TODO: adjust the number of rows, columns
      CSize( 10, 10 ),      // TODO: adjust the minimum pane size
      pContext ))
      return FALSE;

   m_pWndSplitter->m_nhSplitterBoxPos = gxLeft;
   m_pWndSplitter->m_nvSplitterBoxPos = gxBottom;

   // This is just some fancy sample to demonstrate that
   // you can embedd any CWnd into the scrollbar area
   // (e.g. like in MS Word a page up/page down button)
   {
      CButton* pButton = new CButton();

      pButton->Create(_T("Resizable Button"), BS_PUSHBUTTON|WS_VISIBLE,
               CRect(0, 0, 1, 1),
         m_pWndSplitter,
         GX_IDW_INSIDE_FIRST+1);
      m_pWndSplitter->m_apInsideWndState[gxRight] = new CGXInsideWndState;
      CGXInsideWndState& state = *m_pWndSplitter->m_apInsideWndState[gxRight];
      state.pWnd = pButton;
      state.size = CSize(100, 5);
      state.sizeMin = CSize(50, 0);
      state.sizeBox = CSize(6, 0);
      state.nAlign = gxRight;
      state.bResizable = TRUE;
      state.lRelSize = 500;
   }

   {
      CButton* pButton = new CButton();

      pButton->Create(_T("X"), BS_PUSHBUTTON|WS_VISIBLE,
               CRect(0, 0, 1, 1),
         m_pWndSplitter,
         GX_IDW_INSIDE_FIRST+3);
      m_pWndSplitter->m_apInsideWndState[gxBottom] = new CGXInsideWndState;
      CGXInsideWndState& state = *m_pWndSplitter->m_apInsideWndState[gxBottom];
      state.pWnd = pButton;
      state.size = CSize(0,100);
      state.sizeMin = CSize(0, 50);
      state.sizeBox = CSize(0, 6);
      state.nAlign = gxBottom;
      state.bResizable = FALSE;
      state.lRelSize = 500;
   }


   return TRUE;
}

CGXSplitterWnd

Class Overview | Class Members