![]() |
Dialog & CommandBars & Panes |
Post Reply ![]() |
Author | |
jimmy ![]() Senior Member ![]() Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
![]() ![]() ![]() ![]() ![]() Posted: 02 November 2006 at 10:29am |
Hello,
I've a resizeable Dialog with a commandbar & statusbar. Work good. Now i will add a panemanager. How look like OnSize for this ? Now i have void CExResizeDialog::OnSize(UINT nType, int cx, int cy) { __super::OnSize(nType, cx, cy); RepositionControls(); } void CExResizeDialog::RepositionControls() { if (m_bInRepositionControls) return; m_bInRepositionControls = TRUE; CRect rcClientStart; CRect rcClientNow; GetClientRect(rcClientStart); RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0, reposQuery, rcClientNow); CRect rcBorders(rcClientNow.left - rcClientStart.left, rcClientNow.top - rcClientStart.top, rcClientStart.right - rcClientNow.right, rcClientStart.bottom - rcClientNow.bottom); if (rcBorders != m_rcBorders) { CPoint ptOffset(rcBorders.left - m_rcBorders.left, rcBorders.top - m_rcBorders.top); CRect rcWindow; GetWindowRect(rcWindow); rcWindow.right += rcBorders.left + rcBorders.right - m_rcBorders.left - m_rcBorders.right; rcWindow.bottom += rcBorders.top + rcBorders.bottom - m_rcBorders.top - m_rcBorders.bottom; Offset(ptOffset); m_rcWindow = rcWindow; MoveWindow(rcWindow, TRUE); } m_rcBorders = rcBorders; RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0); m_bInRepositionControls = FALSE; } But how can i add the paneManager ? Any sample for this ? Thanx Jimmy |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
it looks like craze idea - you have COmmandBars/DockingPane/StatusBar and why you still use CDialog.... Try to change it to simple CFrameWnd + CFormView and life will be easy.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jimmy ![]() Senior Member ![]() Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
![]() ![]() ![]() ![]() ![]() |
Hi,
First it was only a ResizeDialogBase class. Than we need a statusbar. Than we need on a other dialog Commonbars. Now a costumer sad he need a additional (Dockable) state window. So i must add a DockingPane. Ok, i will look to change our base class to a CFrameWnd/CFormView base class. Is there a way to lock resizing CFrameWnd/CFormView ? greetings from austria Jimmy |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
One of solution to remove WS_THICKFRAMEstyle: BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( !CMDIFrameWnd::PreCreateWindow(cs) ) return FALSE; // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cscs.style &= ~WS_THICKFRAME; return TRUE;} |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |