• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ RecalcLayout函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中RecalcLayout函数的典型用法代码示例。如果您正苦于以下问题:C++ RecalcLayout函数的具体用法?C++ RecalcLayout怎么用?C++ RecalcLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了RecalcLayout函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: RecalcLayout

// sets the width of the frame
void CLTGUIFillFrame::SetFrameWidth( uint8 nFrameWidth )
{
	m_nFrameWidth = nFrameWidth;
	RecalcLayout();
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:6,代码来源:ltguifillframe.cpp


示例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);
	}
}
开发者ID:YueLinHo,项目名称:WinMerge,代码行数:66,代码来源:ChildFrm.cpp


示例3: RecalcLayout

void CFrameWnd::OnSize( UINT nType, int cx, int cy )
/**************************************************/
{
    CWnd::OnSize( nType, cx, cy );
    RecalcLayout();
}
开发者ID:ArmstrongJ,项目名称:open-watcom-v2,代码行数:6,代码来源:framewnd.cpp


示例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);
*/
开发者ID:open2cerp,项目名称:Open2C-ERP,代码行数:67,代码来源:MainFrm.cpp


示例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();
	}
}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:75,代码来源:XTPDockingPaneSidePanel.cpp


示例6: WXUNUSED

//---------------------------------------------------------------------------
void wxTabbedWindow::OnSize ( wxSizeEvent& WXUNUSED(event) )
{
    SetBackgroundColour( wxColour( 192,192,192 ) );
    RecalcLayout(true);
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:6,代码来源:tabpgwin.cpp


示例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();
}
开发者ID:quinsmpang,项目名称:Tools,代码行数:101,代码来源:Mainfrm.cpp


示例8: ASFloatToFixed

void CDataShield::SetYTransT(double Y_Trans_Total)
{
	m_Y_Translation_Total = ASFloatToFixed(Y_Trans_Total / m_UnitK);
	RecalcLayout();
}
开发者ID:Ulysses1962,项目名称:light-imposition,代码行数:5,代码来源:DataShield.cpp


示例9: RecalcLayout

void CDataShield::SetRAngleT(double RAngle_Total)
{
	// ????????? А нужно ли?
	m_Rotation_Angle_Total = RAngle_Total;
	RecalcLayout();
}
开发者ID:Ulysses1962,项目名称:light-imposition,代码行数:6,代码来源:DataShield.cpp


示例10: RecalcLayout

void gkToolBarPaneBase::OnSize(UINT nType, int cx, int cy) 
{
	IPaneBase::OnSize(nType, cx, cy);
	RecalcLayout();
}
开发者ID:CheryJazz,项目名称:gkEngine,代码行数:5,代码来源:gkToolBarPaneBase.cpp


示例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;
}
开发者ID:fourier,项目名称:Geometry2d,代码行数:101,代码来源:MainFrm.cpp


示例12: RecalcLayout

void CTTCheckBtnGroup::OnSize(UINT nType, int cx, int cy)
{
	CButton::OnSize(nType, cx, cy);
	RecalcLayout();
	Invalidate(FALSE);
}
开发者ID:else-if,项目名称:FlatTabCtrl,代码行数:6,代码来源:TTCheckBtnGroup.cpp


示例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);
//.........这里部分代码省略.........
开发者ID:Joincheng,项目名称:lithtech,代码行数:101,代码来源:FRAMEWND.CPP


示例14: RecalcLayout

//---------------------------------------------------------------------------
void wxTabbedWindow::SetActiveTab( int tabNo )
{
    mActiveTab = tabNo;
    RecalcLayout(true);
    Refresh();
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:7,代码来源:tabpgwin.cpp


示例15: RecalcLayout

void CXTPCoreTreeControl::OnSize(UINT nType, int cx, int cy)
{
	CWnd::OnSize(nType, cx, cy);

	RecalcLayout();
}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:6,代码来源:XTPCoreTreeControl.cpp


示例16: GetActiveDocument

void CMainFrame::OnViewChange(UINT nCmdID)
// There is an ON_COMMAND_RANGE message map entry associated with
// OnViewChange:
// ON_COMMAND_RANGE(ID_VIEW_CHANGE1, ID_VIEW_CHANGE2, &OnViewChange)
{
   CView* pViewAdd;
   CView* pViewRemove;
   CDocument* pDoc = GetActiveDocument();

   // cvView1 and cvView2 are enum members defined in my CMainFrame class
   if((nCmdID == ID_VIEW_CHANGE1) && (m_currentView == cvView1))
      return;
   if((nCmdID == ID_VIEW_CHANGE2) && (m_currentView == cvView2))
      return;

   if (nCmdID == ID_VIEW_CHANGE2)
   {
      if (m_pView2 == NULL)
      {
         m_pView1 = GetActiveView();
         m_pView2 = new CMyView2;

         //Note that if OnSize has been overridden in CMyView2 
         //and GetDocument() is used in this override it can 
         //cause assertions and, if the assertions are ignored,
         //cause access violation.

         m_pView2->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW, rectDefault, this, 
            AFX_IDW_PANE_FIRST + 1, NULL);
      }
      pViewAdd = m_pView2;
      pViewRemove = m_pView1;
      m_currentView = cvView2;
   }
   else
   {
      pViewAdd = m_pView1;
      pViewRemove = m_pView2;
      m_currentView = cvView1;
   }

   // Set the child i.d. of the active view to AFX_IDW_PANE_FIRST,
   // so that CFrameWnd::RecalcLayout will allocate to this 
   // "first pane" that portion of   the frame window's client area 
   // not allocated to control   bars.  Set the child i.d. of the 
   // other view to anything other than AFX_IDW_PANE_FIRST; this
   // examples switches the child id's of the two views.

   int nSwitchChildID = pViewAdd->GetDlgCtrlID();
   pViewAdd->SetDlgCtrlID(AFX_IDW_PANE_FIRST);
   pViewRemove->SetDlgCtrlID(nSwitchChildID);

   // Show the newly active view and hide the inactive view.

   pViewAdd->ShowWindow(SW_SHOW);
   pViewRemove->ShowWindow(SW_HIDE);

   // Connect the newly active view to the document, and
   // disconnect the inactive view.
   pDoc->AddView(pViewAdd);
   pDoc->RemoveView(pViewRemove);

   SetActiveView(pViewAdd);
   RecalcLayout();
}
开发者ID:terryjintry,项目名称:OLSource1,代码行数:65,代码来源:cdocument-class_1.cpp


示例17: RecalcLayout

void CMainFrame::ViewPropertyWnd()
{
	m_wndProperties.ShowWindow(m_wndProperties.IsVisible() ? SW_HIDE : SW_SHOW);
	RecalcLayout(FALSE);
}
开发者ID:yellowcd,项目名称:sMIShop,代码行数:5,代码来源:MainFrm.cpp


示例18: RecalcLayout

void JMFrame::showQuickBrowser(bool show) {
  m_wndDlgBar.ShowWindow(show ? SW_SHOW : SW_HIDE);
  RecalcLayout();
}
开发者ID:amiel,项目名称:jugglemaster,代码行数:4,代码来源:form.cpp


示例19: RecalcLayout

void CMainFrame::OnViewCaptionBar()
{
	m_wndCaptionBar.ShowWindow(m_wndCaptionBar.IsVisible() ? SW_HIDE : SW_SHOW);
	RecalcLayout(FALSE);
}
开发者ID:Catherine0320,项目名称:YAP,代码行数:5,代码来源:MainFrm.cpp


示例20: CRect


//.........这里部分代码省略.........
		);
	
	m_wndMenuBar.SetUpdateFileMruList(FALSE);
	if(
		!m_wndMenuBar.Create(
			_T("menubar"),
			this,
			ID_VIEW_MENUBAR
			)

		||
		!m_wndMenuBar.LoadMenuBar(IDR_MAINFRAME)
		)
    {
        TRACE0("Failed to create menubar\n");
        return -1;      // failed to create
    }

	if( !m_wndToolBar.Create(
			_T("ToolBar"),
			this,
			AFX_IDW_TOOLBAR
			)
		||
		!m_wndToolBar.LoadToolBar(IDR_MAINFRAME)
		)
	{
		TRACE0("Failed to create toolbar\n");
		return -1;      // fail to create
	}

	if(	!m_wndResizableBar0.Create(
			_T("Resizable Bar 0"),
			this,
			ID_VIEW_RESIZABLE_BAR_0
			)
		)
	{
		TRACE0("Failed to create m_wndResizableBar0\n");
		return -1;		// fail to create
	}

	if(	!m_wndResizableBar1.Create(
			_T("Resizable Bar 1"),
			this,
			ID_VIEW_RESIZABLE_BAR_1
			)
		)
	{
		TRACE0("Failed to create m_wndResizableBar1\n");
		return -1;		// fail to create
	}

	if (!m_wndStatusBar.Create(this) ||
		!m_wndStatusBar.SetIndicators(indicators,
		  sizeof(indicators)/sizeof(UINT)))
	{
		TRACE0("Failed to create status bar\n");
		return -1;      // fail to create
	}

	m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
	m_wndResizableBar0.EnableDocking(CBRS_ALIGN_ANY);
	m_wndResizableBar1.EnableDocking(CBRS_ALIGN_ANY);
	
///	EnableDocking(CBRS_ALIGN_ANY);
	CExtControlBar::FrameEnableDocking(this);

	DockControlBar(&m_wndMenuBar);
	DockControlBar(&m_wndToolBar);
	DockControlBar(&m_wndResizableBar0,AFX_IDW_DOCKBAR_LEFT);
	RecalcLayout();
CRect wrAlredyDockedBar;
	m_wndResizableBar0.GetWindowRect( &wrAlredyDockedBar );
	wrAlredyDockedBar.OffsetRect( 0, 1 );
	DockControlBar(&m_wndResizableBar1,AFX_IDW_DOCKBAR_LEFT,&wrAlredyDockedBar);

	VERIFY(
		g_CmdManager->SetBasicCommands(
			pApp->m_pszProfileName,
			g_statBasicCommands
			)
		);

	CExtControlBar::ProfileBarStateLoad(
		this,
		pApp->m_pszRegistryKey,
		pApp->m_pszProfileName,
		&m_dataFrameWP
		);
	g_CmdManager->SerializeState(
		pApp->m_pszProfileName,
		pApp->m_pszRegistryKey,
		pApp->m_pszProfileName,
		false
		);

	return 0;
}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:101,代码来源:MainFrm.cpp



注:本文中的RecalcLayout函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ReceiveData函数代码示例发布时间:2022-05-30
下一篇:
C++ Recalc函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap