本文整理汇总了C++中RecalcLayout函数的典型用法代码示例。如果您正苦于以下问题:C++ RecalcLayout函数的具体用法?C++ RecalcLayout怎么用?C++ RecalcLayout使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RecalcLayout函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RecalcLayout
// sets the width of the frame
void CLTGUIFillFrame::SetFrameWidth( uint8 nFrameWidth )
{
m_nFrameWidth = nFrameWidth;
RecalcLayout();
}
示例2: GetMDIFrame
void CChildFrame::ActivateFrame(int nCmdShow)
{
BOOL bMaximized = FALSE;
CMDIChildWnd * oldActiveFrame = GetMDIFrame()->MDIGetActive(&bMaximized);
if (!m_bActivated)
{
m_bActivated = TRUE;
// get the active child frame, and a flag whether it is maximized
if (oldActiveFrame == NULL)
// for the first frame, get the restored/maximized state from the registry
bMaximized = theApp.GetProfileInt(_T("Settings"), _T("ActiveFrameMax"), FALSE);
if (bMaximized)
nCmdShow = SW_SHOWMAXIMIZED;
else
nCmdShow = SW_SHOWNORMAL;
}
// load the bars layout
// initialize the diff pane state with default dimension
int initialDiffHeight = ((CMergeDiffDetailView*)m_wndDetailSplitter.GetPane(1,0))->ComputeInitialHeight();
UpdateDiffDockbarHeight(initialDiffHeight);
// load docking positions and sizes
CDockState pDockState;
pDockState.LoadState(_T("Settings"));
if (EnsureValidDockState(pDockState)) // checks for valid so won't ASSERT
SetDockState(pDockState);
// for the dimensions of the diff and location pane, use the CSizingControlBar loader
m_wndLocationBar.LoadState(_T("Settings"));
m_wndDetailBar.LoadState(_T("Settings"));
if (bMaximized)
{
// If ActivateFrame() is called without tricks, Resizing panes in MergeView window could be visible.
// Here, two tricks are used.
// [First trick]
// To complete resizing panes before displaying MergeView window,
// it needs to send WM_SIZE message with SIZE_MAXIMIZED to MergeView window before calling ActivateFrame().
// [Second trick]
// But it causes side effect that DirView window becomes restored window from maximized window
// and the process could be visible.
// To avoid it, it needs to block the redrawing DirView window.
// I had tried to use LockWindowUpdate for this purpose. However, it had caused flickering desktop icons.
// So instead of using LockWindowUpdate(),
// I wrote My[Lock/Unlock]WindowUpdate() function that uses subclassing window.
//
if (oldActiveFrame)
MyLockWindowUpdate(oldActiveFrame->m_hWnd);
RECT rc;
GetClientRect(&rc);
SendMessage(WM_SIZE, SIZE_MAXIMIZED, MAKELPARAM(rc.right, rc.bottom));
CMDIChildWnd::ActivateFrame(nCmdShow);
if (oldActiveFrame)
MyUnlockWindowUpdate(oldActiveFrame->m_hWnd);
}
else
{
RecalcLayout();
CMDIChildWnd::ActivateFrame(nCmdShow);
}
}
示例3: RecalcLayout
void CFrameWnd::OnSize( UINT nType, int cx, int cy )
/**************************************************/
{
CWnd::OnSize( nType, cx, cy );
RecalcLayout();
}
示例4: SetTitle
//.........这里部分代码省略.........
//m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
m_ToolMain.EnableDocking(CBRS_ALIGN_ANY);
m_ToolModule.EnableDocking(CBRS_ALIGN_ANY);
if(nCurAppRunMode==CONFIG_MODE)
m_ToolEdit.EnableDocking(CBRS_ALIGN_ANY);
m_ParentMessageBar.EnableDocking(CBRS_ALIGN_ANY);
if(nCurAppRunMode==CONFIG_MODE)
{
m_ParentDebugMessageBar.EnableDocking(CBRS_ALIGN_ANY);
m_ParentStackBar.EnableDocking(CBRS_ALIGN_ANY);
m_ParentPropertyBar.EnableDocking(CBRS_ALIGN_ANY);
}
if( !CExtControlBar::FrameEnableDocking(this) )
{
ASSERT( FALSE );
return -1;
}
//DockControlBar(&m_wndMenuBar,AFX_IDW_DOCKBAR_TOP);
DockControlBar(&m_ToolMain);
DockControlBar(&m_ToolModule,AFX_IDW_DOCKBAR_BOTTOM);
if(nCurAppRunMode==CONFIG_MODE)
DockControlBar(&m_ToolEdit,AFX_IDW_DOCKBAR_BOTTOM);
RecalcLayout();
m_ParentMessageBar.SetInitDesiredSizeHorizontal( CSize(80,80) );
m_ParentMessageBar.DockControlBar(AFX_IDW_DOCKBAR_BOTTOM,1,this,false);
if(nCurAppRunMode==CONFIG_MODE)
{
m_ParentDebugMessageBar.SetInitDesiredSizeHorizontal( CSize(80,80) );
m_ParentDebugMessageBar.DockControlBar(AFX_IDW_DOCKBAR_BOTTOM,2,this,false);
m_ParentStackBar.SetInitDesiredSizeHorizontal( CSize(80,80) );
m_ParentStackBar.DockControlBar(AFX_IDW_DOCKBAR_RIGHT,1,this,false);
m_ParentPropertyBar.SetInitDesiredSizeVertical( CSize(180,80) );
m_ParentPropertyBar.DockControlBar(AFX_IDW_DOCKBAR_RIGHT,1,this,false);
// m_ParentPropertyBar.SetInitDesiredSizeHorizontal( CSize(180,80) );
// m_ParentPropertyBar.SetInitDesiredSizeFloating( CSize(380,380) );
// m_ParentPropertyBar.FloatControlBar();
// m_ParentPropertyBar.AutoHideModeGet();
}
/* g_CmdManager->SetBasicCommands(
csProfileName,
g_statBasicCommands);
*/
示例5: _RestoreFocus
void CXTPDockingPaneSidePanel::OnNcLButtonDown(UINT nHitTest, CPoint point)
{
if (nHitTest >= HTSIZEFIRST && nHitTest <= HTSIZELAST)
{
_RestoreFocus();
Expand();
SetCapture();
m_pLayout->MoveToTail(this);
CXTPWindowRect rcWindow(this);
CRect rcClient(GetDockingPaneManager()->GetClientPane()->GetPaneWindowRect());
rcClient.DeflateRect(GetDockingPaneManager()->GetSideDockingMargin());
rcWindow.OffsetRect(-rcClient.TopLeft());
MINMAXINFO mmi;
GetMinMaxInfo(&mmi);
BOOL bResizeTop = nHitTest == HTTOP || nHitTest == HTTOPLEFT || nHitTest == HTTOPRIGHT;
BOOL bResizeBottom = nHitTest == HTBOTTOM || nHitTest == HTBOTTOMLEFT || nHitTest == HTBOTTOMRIGHT;
BOOL bResizeRight = nHitTest == HTRIGHT || nHitTest == HTTOPRIGHT || nHitTest == HTBOTTOMRIGHT;
BOOL bResizeLeft = nHitTest == HTLEFT || nHitTest == HTTOPLEFT || nHitTest == HTBOTTOMLEFT;
while (::GetCapture() == m_hWnd)
{
MSG msg;
if (!GetMessage(&msg, NULL, 0, 0))
break;
if (msg.message == WM_MOUSEMOVE)
{
CPoint pt = CPoint(msg.lParam);
ClientToScreen(&pt);
CPoint ptOffset = pt - point;
point = pt;
if (bResizeTop) rcWindow.top += ptOffset.y;
if (bResizeBottom) rcWindow.bottom += ptOffset.y;
if (bResizeRight) rcWindow.right += ptOffset.x;
if (bResizeLeft) rcWindow.left += ptOffset.x;
m_rcWindow = rcWindow;
if (m_rcWindow.Height() > mmi.ptMaxTrackSize.y)
{
if (bResizeTop) m_rcWindow.top = m_rcWindow.bottom - mmi.ptMaxTrackSize.y; else m_rcWindow.bottom = m_rcWindow.top + mmi.ptMaxTrackSize.y;
}
if (m_rcWindow.Height() < mmi.ptMinTrackSize.y)
{
if (bResizeTop) m_rcWindow.top = m_rcWindow.bottom - mmi.ptMinTrackSize.y; else m_rcWindow.bottom = m_rcWindow.top + mmi.ptMinTrackSize.y;
}
if (m_rcWindow.Width() > mmi.ptMaxTrackSize.x)
{
if (bResizeLeft) m_rcWindow.left = m_rcWindow.right - mmi.ptMaxTrackSize.x; else m_rcWindow.right = m_rcWindow.left + mmi.ptMaxTrackSize.x;
}
if (m_rcWindow.Width() < mmi.ptMinTrackSize.x)
{
if (bResizeLeft) m_rcWindow.left = m_rcWindow.right - mmi.ptMinTrackSize.x; else m_rcWindow.right = m_rcWindow.left + mmi.ptMinTrackSize.x;
}
RecalcLayout(FALSE);
}
else if (msg.message == WM_KEYDOWN && msg.wParam == VK_ESCAPE) break;
else if (msg.message == WM_LBUTTONUP) break;
else ::DispatchMessage(&msg);
}
if (CWnd::GetCapture() == this) ReleaseCapture();
}
}
示例6: WXUNUSED
//---------------------------------------------------------------------------
void wxTabbedWindow::OnSize ( wxSizeEvent& WXUNUSED(event) )
{
SetBackgroundColour( wxColour( 192,192,192 ) );
RecalcLayout(true);
}
示例7: switch
//.........这里部分代码省略.........
SetMenuTheme(&mt);
}
break;
case IDM_GOLD:
{
SetReBarColors( RGB(230, 180, 0), RGB(240, 210, 90), RGB(255, 240, 150), RGB(180, 140, 50) );
StatusBarTheme sbt = {TRUE, RGB(230, 180, 0), RGB(240, 210, 90)};
SetStatusBarTheme (&sbt);
ToolBarTheme tbt = {TRUE, RGB(192, 210, 238), RGB(192, 210, 238), RGB(152, 181, 226), RGB(152, 181, 226), RGB(49, 106, 197)};
SetToolBarTheme(&tbt);
MenuTheme mt = {TRUE, RGB(196, 215, 250), RGB( 120, 180, 220), RGB(240, 210, 90), RGB(255, 240, 150), RGB(128, 128, 128)};
SetMenuTheme(&mt);
}
break;
case IDM_OCHRE:
{
SetReBarColors( RGB(248, 132, 12), RGB(248, 198, 10), RGB(248, 210, 20), RGB(248, 141, 6) );
StatusBarTheme sbt = {TRUE, RGB(248, 132, 12), RGB(248, 198, 10)};
SetStatusBarTheme (&sbt);
ToolBarTheme tbt = {TRUE, RGB(192, 210, 238), RGB(192, 210, 238), RGB(152, 181, 226), RGB(152, 181, 226), RGB(49, 106, 197)};
SetToolBarTheme(&tbt);
MenuTheme mt = {TRUE, RGB(196, 215, 250), RGB( 120, 180, 220), RGB(150,190,245), RGB(220,230,250), RGB(128, 128, 128)};
SetMenuTheme(&mt);
}
break;
case IDM_PINK:
{
SetReBarColors( RGB(255, 130, 190), RGB(250, 205, 235), RGB(250, 205, 235), RGB(255, 120, 170) );
StatusBarTheme sbt = {TRUE, RGB(255, 130, 190), RGB(250, 205, 235)};
SetStatusBarTheme (&sbt);
ToolBarTheme tbt = {TRUE, RGB(192, 210, 238), RGB(192, 210, 238), RGB(248, 147, 220), RGB(248, 153, 179), RGB(49, 106, 197)};
SetToolBarTheme(&tbt);
MenuTheme mt = {TRUE, RGB(196, 215, 250), RGB( 120, 180, 220), RGB(255, 130, 190), RGB(250, 205, 235), RGB(128, 128, 128)};
SetMenuTheme(&mt);
}
break;
case IDM_MAUVE:
{
SetReBarColors( RGB(210, 128, 155), RGB(230, 160, 190), RGB(230, 158, 188), RGB(110, 100, 125) );
StatusBarTheme sbt = {TRUE, RGB(210, 128, 155), RGB(230, 160, 190)};
SetStatusBarTheme (&sbt);
ToolBarTheme tbt = {TRUE, RGB(192, 210, 238), RGB(192, 210, 238), RGB(152, 181, 226), RGB(152, 181, 226), RGB(49, 106, 197)};
SetToolBarTheme(&tbt);
MenuTheme mt = {TRUE, RGB(196, 215, 250), RGB( 120, 180, 220), RGB(150,190,245), RGB(220,230,250), RGB(128, 128, 128)};
SetMenuTheme(&mt);
}
break;
case IDM_BLACK:
{
SetReBarColors( RGB(128, 138 ,176), RGB(98, 108 ,136), RGB(77, 87, 97), RGB(7, 17, 27) );
StatusBarTheme sbt = {TRUE, RGB(128, 138 ,176), RGB(98, 108 ,136)};
SetStatusBarTheme (&sbt);
ToolBarTheme tbt = {TRUE, RGB(49, 106, 197), RGB(64,177,230), RGB(27,65, 160), RGB(64,177,230), RGB(49, 106, 197)};
SetToolBarTheme(&tbt);
MenuTheme mt = {TRUE, RGB(84,197,240), RGB(89, 136, 217), RGB(59, 126, 197), RGB(94,187,230), RGB(128, 128, 128)};
SetMenuTheme(&mt);
}
break;
default:
{
m_nColor = IDM_MODERN;
SetReBarColors( RGB(225, 230, 255), RGB(240, 242, 250), RGB(248, 248, 248), RGB(180, 200, 230) );
StatusBarTheme sbt = {TRUE, RGB(225, 230, 255), RGB(240, 242, 250)};
SetStatusBarTheme (&sbt);
ToolBarTheme tbt = {TRUE, RGB(180, 250, 255), RGB(140, 190, 255), RGB(150, 220, 255), RGB(80, 100, 255), RGB(127, 127, 255)};
SetToolBarTheme(&tbt);
MenuTheme mt = {TRUE, RGB(180, 250, 255), RGB(140, 190, 255), RGB(240, 250, 255), RGB(120, 170, 220), RGB(127, 127, 255)};
SetMenuTheme(&mt);
}
break;
}
// Check the appropriate menu item
int nFileItem = GetMenuItemPos(GetFrameMenu(), _T("Theme"));
if (nFileItem >= 0)
{
CMenu* pThemeMenu = GetFrameMenu()->GetSubMenu(nFileItem);
pThemeMenu->CheckMenuRadioItem(IDM_BLUE, IDM_MODERN, nColor, 0);
}
RecalcLayout();
}
示例8: ASFloatToFixed
void CDataShield::SetYTransT(double Y_Trans_Total)
{
m_Y_Translation_Total = ASFloatToFixed(Y_Trans_Total / m_UnitK);
RecalcLayout();
}
示例9: RecalcLayout
void CDataShield::SetRAngleT(double RAngle_Total)
{
// ????????? А нужно ли?
m_Rotation_Angle_Total = RAngle_Total;
RecalcLayout();
}
示例10: RecalcLayout
void gkToolBarPaneBase::OnSize(UINT nType, int cx, int cy)
{
IPaneBase::OnSize(nType, cx, cy);
RecalcLayout();
}
示例11: ASSERT
//.........这里部分代码省略.........
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}
m_wndProperties.SetInitDesiredSizeVertical(
CSize( 200, 400 )
);
m_wndProperties.SetInitDesiredSizeHorizontal(
CSize( 400, 200 )
);
m_wndNodeOptions.SetInitDesiredSizeVertical(
CSize( 200, 400 )
);
m_wndNodeOptions.SetInitDesiredSizeHorizontal(
CSize( 400, 200 )
);
if( !m_wndProperties.Create(
_T("Properties"),
this,
ID_VIEW_WIZARD_SHEET_PLACER )
)
{
TRACE0("Failed to create m_wndProperties\n");
return -1; // fail to create
}
if( !m_wndNodeOptions.Create(
_T("Node options"),
this,
ID_NODEOPTIONS_HOLDER)
)
{
TRACE0("Failed to create m_wndProperties\n");
return -1; // fail to create
}
if( !m_wndInBarProperties.Create(
IDD_PROPERTIES_DLG,
&m_wndProperties)
)
{
TRACE0("Failed to create m_wndInBarProperties\n");
return -1; // fail to create
}
m_wndInBarProperties.ShowSizeGrip( FALSE );
if( !m_wndInBarNodeProperties.Create(
IDD_NODE_PROPERTIES,
&m_wndNodeOptions)
)
{
TRACE0("Failed to create m_wndInBarProperties\n");
return -1; // fail to create
}
m_wndInBarProperties.ShowSizeGrip( FALSE );
m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndTriangleToolBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndPropertiesToolBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndBoundaryToolBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndPrimitivesToolBar.EnableDocking(CBRS_ALIGN_ANY);
m_wndProperties.EnableDocking(CBRS_ALIGN_ANY);
m_wndNodeOptions.EnableDocking(CBRS_ALIGN_ANY);
RecalcLayout();
if( !CExtControlBar::FrameEnableDocking(this) )
{
ASSERT( FALSE );
return -1;
}
DockControlBar(&m_wndMenuBar);
DockControlBar(&m_wndToolBar);
DockControlBar(&m_wndTriangleToolBar);
DockControlBar(&m_wndBoundaryToolBar);
DockControlBar(&m_wndPropertiesToolBar);
DockControlBar(&m_wndPrimitivesToolBar);
DockControlBar(&m_wndProperties);
DockControlBar(&m_wndNodeOptions);
m_wndProperties.DockControlBar( AFX_IDW_DOCKBAR_LEFT, 2, this, false );
m_wndNodeOptions.DockControlBar( AFX_IDW_DOCKBAR_RIGHT, 2, this, false );
int nIndicator=m_wndStatusBar.CommandToIndex(ID_INDICATORXY);
m_wndStatusBar.SetPaneInfo(nIndicator, ID_INDICATORXY, SBPS_NORMAL, 100);
nIndicator=m_wndStatusBar.CommandToIndex(ID_INDICATORMODE);
m_wndStatusBar.SetPaneInfo(nIndicator, ID_INDICATORMODE, SBPS_NORMAL, 60);
RecalcLayout();
return 0;
}
示例12: RecalcLayout
void CTTCheckBtnGroup::OnSize(UINT nType, int cx, int cy)
{
CButton::OnSize(nType, cx, cy);
RecalcLayout();
Invalidate(FALSE);
}
示例13: while
//------------------------------------------------------------------------
void CMRCFrameWndSizeDock::SaveBarSizes(LPCTSTR pszSection, BOOL bSave)
// Saves all the sizeable bars info
// uses the "ID" of the bar as a key. The bar will already exist on a
// load, so this seems safe enough
//------------------------------------------------------------------------
{
struct BarSizeSaveInfo BSI;
CMRCSizeControlBar* pBar;
char szBarId[20] = "BarSize_";
CPtrArray arrFloatingBars;
POSITION pos = m_listControlBars.GetHeadPosition();
while (pos != NULL)
{
pBar = (CMRCSizeControlBar *) m_listControlBars.GetNext(pos);
ASSERT(pBar != NULL);
if (pBar->IsKindOf(RUNTIME_CLASS(CMRCSizeControlBar)))
{
UINT nID = pBar->GetDlgCtrlID();
_itoa(nID, szBarId + 8, 10);
if (bSave)
{
BSI.VertDockSize = pBar->m_VertDockSize;
BSI.HorzDockSize = pBar->m_HorzDockSize;
BSI.FloatSize = pBar->m_FloatSize;
BSI.bMDIFloating = FALSE;
// if floating in a MDI Float window.
CFrameWnd * pBarFrame = pBar->GetDockingFrame();
if (pBarFrame != NULL && pBarFrame->IsKindOf(RUNTIME_CLASS(CMRCMDIFloatWnd)))
{
ASSERT(pBar->IsFloating());
BSI.bMDIFloating = TRUE;
}
MRCWriteProfileBinary (pszSection, szBarId, &BSI, sizeof BSI);
}
else
{
if (MRCGetProfileBinary (pszSection, szBarId, &BSI, sizeof BSI))
{
pBar->m_VertDockSize = BSI.VertDockSize;
pBar->m_HorzDockSize = BSI.HorzDockSize;
pBar->m_FloatSize = BSI.FloatSize;
// Now have to set the actual window size. The reason for this is
// that the Adjustment algorithm looks at actual window rect sizes, so
// it doesn't have to worry about borders etc.
CSize NewSize = pBar->CalcFixedLayout(FALSE, (pBar->m_dwStyle & CBRS_ORIENT_HORZ));
pBar->SetWindowPos(0, 0, 0, NewSize.cx, NewSize.cy,
SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE);
if (pBar->IsFloating())
{
if (BSI.bMDIFloating) // floating in an MDI frame - do the float
{
// have to cast to CMRCMDIFrameWndSizeDock - as this is a CFrameWnd function
ASSERT(this->IsKindOf(RUNTIME_CLASS(CMRCMDIFrameWndSizeDock)));
arrFloatingBars.Add(pBar);
}
else
{
CFrameWnd * pFrame = pBar->GetParentFrame();
if (pFrame != NULL)
pFrame->RecalcLayout();
}
}
}
#ifdef _VERBOSE_TRACE
TRACE("Bar ID=%d, Floating(%d,%d), HorzDocked(%d,%d), VertDocked(%d.%d)\n",
nID,
BSI.FloatSize.cx, BSI.FloatSize.cy,
BSI.VertDockSize.cx, BSI.VertDockSize.cy,
BSI.HorzDockSize.cx, BSI.HorzDockSize.cy);
#endif
}
#ifdef _VERBOSE_TRACE
CString strTitle;
pBar->GetWindowText(strTitle);
TRACE("%s '%s' ID=%d Float(%d,%d) Horz(%d,%d) Vert(%d,%d)\n",
LPCTSTR(pBar->GetRuntimeClass()->m_lpszClassName),
LPCTSTR(strTitle), nID,
pBar->m_FloatSize.cx, pBar->m_FloatSize.cy,
pBar->m_HorzDockSize.cx, pBar->m_HorzDockSize.cy,
pBar->m_VertDockSize.cx, pBar->m_VertDockSize.cy);
#endif
}
}
RecalcLayout(); // recalc the layout - so we end up with a meaningful set of bars
if (!bSave)
{
for (int i = 0; i < arrFloatingBars.GetSize(); i++)
{
pBar = (CMRCSizeControlBar *) arrFloatingBars[i];
ASSERT(pBar->m_pDockContext != NULL);
//.........这里部分代码省略.........
示例14: RecalcLayout
//---------------------------------------------------------------------------
void wxTabbedWindow::SetActiveTab( int tabNo )
{
mActiveTab = tabNo;
RecalcLayout(true);
Refresh();
}
示例15: RecalcLayout
void CXTPCoreTreeControl::OnSize(UINT nType, int cx, int cy)
{
CWnd::OnSize(nType, cx, cy);
RecalcLayout();
}