当前位置: 首页>>代码示例>>C++>>正文


C++ OnSize函数代码示例

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


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

示例1: OnSize

	void AppFrame::windowResized( Ogre::RenderWindow* rw )
	{
		KUINT width, height, depth;
		KINT left, top;
		rw->getMetrics(width, height, depth, left, top);

		OnSize(width,height);
开发者ID:dzw,项目名称:kylin001v,代码行数:7,代码来源:AppFrame.cpp

示例2: OnSize

void CWndRepairItemCtrl::SetWndRect( CRect rectWnd, BOOL bOnSize )
{
	m_rectWindow	= rectWnd;
	m_rectClient	= m_rectWindow;

	if( bOnSize )
		OnSize( 0, m_rectClient.Width(), m_rectClient.Height() );
}
开发者ID:careysky,项目名称:FlyFF,代码行数:8,代码来源:WndRepairItemCtrl.cpp

示例3: OnSize

void CUploadsWnd::OnSkinChange()
{
	OnSize( 0, 0, 0 );
	CPanelWnd::OnSkinChange();
	Skin.Translate( _T("CUploadCtrl"), &m_wndUploads.m_wndHeader);
	Skin.CreateToolBar( _T("CUploadsWnd"), &m_wndToolBar );
	m_wndUploads.OnSkinChange();
}
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:8,代码来源:WndUploads.cpp

示例4: OnSize

void MeterToolBar::Create(wxWindow * parent)
{
   ToolBar::Create(parent);

   // Simulate a size event to set initial meter placement/size
   wxSizeEvent dummy;
   OnSize(dummy);
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:8,代码来源:MeterToolBar.cpp

示例5: OnSize

void GLCanvas::resize( wxSizeEvent& evt )
{
    gravUtil::logVerbose( "GLCanvas::resize: resize callback: to %ix%i\n",
            evt.GetSize().GetWidth(), evt.GetSize().GetHeight() );
    OnSize( evt );
    Refresh( false );
    GLreshape( evt.GetSize().GetWidth(), evt.GetSize().GetHeight() );
}
开发者ID:Adhesion,项目名称:grav,代码行数:8,代码来源:GLCanvas.cpp

示例6: GetDocument

void CViewStatistics::OnInitialUpdate() 
{
	CFormView::OnInitialUpdate();

	m_pDoc       = (CGnucleusDoc*) GetDocument();
	m_autNetwork = m_pDoc->m_autNetwork;

	// Property Sheets
	m_TabMain		  = new CStatisticsMain(this);
	m_TabDistribution = new CStatisticsDistribution(this);
	m_TabPackets	  = new CStatisticsPackets(this);
	m_TabBandwidth	  = new CStatisticsBandwidth(this);
	m_TabLog		  = new CStatisticsLog;
	m_TabMemory		  = new CStatisticsMemory(this);
	m_TabError		  = new CStatisticsError(this);

	//m_pSheet.AddPage(m_TabMain);
	//m_pSheet.AddPage(m_TabDistribution);
	//m_pSheet.AddPage(m_TabPackets);
	//m_pSheet.AddPage(m_TabBandwidth);
	m_pSheet.AddPage(m_TabLog);
	//m_pSheet.AddPage(m_TabMemory);
	//m_pSheet.AddPage(m_TabError);

	CreatePropSheet(this, &m_pSheet);
	SizePropSheet(this, &m_pSheet, IDC_PSHEET_AREA);

	for(int i = 0; i < m_pSheet.GetPageCount(); ++i)
		m_pSheet.SetActivePage(i);
	m_pSheet.SetActivePage(0);

	// Set Title
	//m_TimeStarted = CTime::GetCurrentTime();
	//GetParentFrame()->SetWindowText("Statistics - " + m_TimeStarted.Format("%I:%M %p"));

	// Connected Nodes listbox
	int offSet = m_lstNodes.GetScrollLimit(SB_VERT) ? ::GetSystemMetrics(SM_CXVSCROLL) + 3 : 4;

	CRect rect;
	m_lstNodes.GetWindowRect(&rect);

	m_lstNodes.InsertColumn( 0, "Node", LVCFMT_LEFT,  rect.Width() - offSet, 0);
	m_lstNodes.InsertColumn( 1, "Type", LVCFMT_LEFT, (rect.Width() - offSet) * 0.5, 1);

	m_lstNodes.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP);
	
	// Size all the controls in proportion to the size
	RECT rWin;
	GetClientRect(&rWin);
	OnSize(SIZE_RESTORED, rWin.right, rWin.bottom);

	m_pDoc->m_pViewStatistics.push_back( GetSafeHwnd() );

	OnSockUpdate();
	/*m_TabDistribution->UpdateDistribution();
	m_TabPackets->UpdateData();
	m_TabBandwidth->UpdateBandwidth();*/
}
开发者ID:swax,项目名称:Gnucleus,代码行数:58,代码来源:ViewStatistics.cpp

示例7: GetClientRect

BOOL CSearchWnd::DoSizeDetails()
{
    MSG* pMsg = &AfxGetThreadState()->m_msgCur;
    CRect rcClient;
    CPoint point;

    GetClientRect( &rcClient );
    if ( m_bPanel )
        rcClient.left += Settings.Skin.SidebarWidth;
    if ( ! ( m_bPaused || m_bWaitMore ) )
        rcClient.top += STATUS_HEIGHT;
    rcClient.bottom -= Settings.Skin.ToolbarHeight;

    ClientToScreen( &rcClient );
    ClipCursor( &rcClient );
    SetCapture();
    ScreenToClient( &rcClient );

    int nOffset = 0xFFFF;

    while ( GetAsyncKeyState( VK_LBUTTON ) & 0x8000 )
    {
        while ( ::PeekMessage( pMsg, NULL, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE ) );

        if ( ! AfxGetThread()->PumpMessage() )
        {
            AfxPostQuitMessage( 0 );
            break;
        }

        GetCursorPos( &point );
        ScreenToClient( &point );

        int nSplit = rcClient.bottom - point.y;

        if ( nOffset == 0xFFFF ) nOffset = m_nDetails - nSplit;
        nSplit += nOffset;

        if ( nSplit < 8 )
            nSplit = 0;
        if ( nSplit > rcClient.Height() - Settings.Skin.Splitter - 8 )
            nSplit = rcClient.Height() - Settings.Skin.Splitter;

        if ( nSplit != m_nDetails )
        {
            m_nDetails = nSplit;
            Settings.Search.DetailPanelSize = nSplit;
            OnSize( SIZE_INTERNAL, 0, 0 );
            Invalidate();
        }
    }

    ReleaseCapture();
    ClipCursor( NULL );

    return TRUE;
}
开发者ID:qing3962,项目名称:peerproject,代码行数:57,代码来源:WndSearch.cpp

示例8: OnSize

BOOL COXLayoutManager::RedrawLayout()
{
	if (m_pContainerWnd == NULL || !::IsWindow(m_pContainerWnd->m_hWnd))
		return FALSE;

	CRect rect;
	m_pContainerWnd->GetClientRect(rect);
	return OnSize(rect.Width(), rect.Height());
}
开发者ID:drupalhunter-team,项目名称:TrackMonitor,代码行数:9,代码来源:OXLayoutManager.cpp

示例9: OnSize

void CWndVendorCtrl::SetWndRect( CRect rectWnd, BOOL bOnSize )
{
	m_rectWindow	= rectWnd;
	m_rectClient	= m_rectWindow;
//	m_rectClient.DeflateRect( 3, 3 );

	if( bOnSize )
		OnSize( 0, m_rectClient.Width(), m_rectClient.Height() );
}
开发者ID:careysky,项目名称:FlyFF,代码行数:9,代码来源:WndVendorCtrl.cpp

示例10: OnSize

// -----------------------------------------------------------------------------
// Called when the dialog is resized
// -----------------------------------------------------------------------------
void GfxConvDialog::onResize(wxSizeEvent& e)
{
	OnSize(e);

	gfx_current_->zoomToFit(true, 0.05f);
	gfx_target_->zoomToFit(true, 0.05f);

	e.Skip();
}
开发者ID:alexey-lysiuk,项目名称:SLADE,代码行数:12,代码来源:GfxConvDialog.cpp

示例11: OnSize

void MainFrame::OnSuperBox()
{
	if (!project.IsOpen() || superBox.IsValid())
		return;
	superBox.Create(GetHandle(), "", ChildWindowStyle);
	OnSize(0, {});
	activeWindow.SetPos(superBox, {}, SWP_NOSIZE|SWP_NOMOVE);
	superBox.SetFocus();
}
开发者ID:jmfb,项目名称:cpp-project-2,代码行数:9,代码来源:MainFrame.cpp

示例12: HandleMessage

LRESULT CMultiLineEditWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    LRESULT lRes = 0;
    BOOL bHandled = TRUE;
    if( uMsg == WM_SIZE ) lRes = OnSize(uMsg, wParam, lParam, bHandled);
    else bHandled = FALSE;
    if( !bHandled ) return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
    return lRes;
}
开发者ID:yuechuanbingzhi163,项目名称:WaterEveryDay,代码行数:9,代码来源:UIEdit.cpp

示例13: switch

  LRESULT CHelloWorld::HandleMessage( UINT uMsg, WPARAM wParam, LPARAM lParam )
  {
      LRESULT lRes = 0;
      BOOL bHandled = TRUE;
      switch (uMsg)
      {
      case WM_CREATE:
          lRes = OnCreate(uMsg ,wParam, lParam, bHandled);
          break;
  
      case WM_DESTROY:
          ::PostQuitMessage(0);
          bHandled = FALSE;
          break;
  
      case WM_NCHITTEST:
          lRes = OnNcHitTest(uMsg, wParam, lParam, bHandled);
          break;
  
      case WM_KEYDOWN:
          if (wParam == VK_ESCAPE)
          {
              OnClose();
          }
         break;
 
     case WM_SIZE:
         lRes = OnSize(uMsg, wParam, lParam, bHandled);
         break;
 
     case WM_NCACTIVATE:
         lRes = OnNcActivate(uMsg, wParam, lParam, bHandled);
         break;
 
     case WM_GETMINMAXINFO:
         lRes = true;
         OnGetMinMaxInfo(uMsg, wParam, lParam, bHandled);        
         break;
 
     case WM_SYSCOMMAND:
         lRes = OnSysCommand(uMsg, wParam, lParam, bHandled); 
         break;
 
     case WM_NCCALCSIZE:
         lRes = OnNcCalcSize(uMsg, wParam, lParam, bHandled); 
         break;
 
     default:
         bHandled = FALSE; break;
     }
     
     if (bHandled) return lRes;
     if (m_pm.MessageHandler(uMsg, wParam, lParam, lRes) != 0)
         return lRes;
     return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
 }
开发者ID:dengxianglong,项目名称:cplusplusprimerplusstudy,代码行数:56,代码来源:HelloWorld.cpp

示例14: OnSize

// Load a bitmap from the resources in the button, the bitmap has to have 3 buttonsstates next to each other: Up/Down/Hover
BOOL CToolTipBitmapButton::LoadBitmap(HANDLE hbitmap)
{
	m_Bitmap.Attach(hbitmap);
	BITMAP	bitmapbits;
	m_Bitmap.GetBitmap(&bitmapbits);
	m_ButtonSize.cy=bitmapbits.bmHeight;
	m_ButtonSize.cx=bitmapbits.bmWidth/4; // up, down, focused, disabled
	OnSize(0,m_ButtonSize.cx,m_ButtonSize.cy);
	return TRUE;
}
开发者ID:AnthonyNystrom,项目名称:GenXSource,代码行数:11,代码来源:ToolTipBitmapButton.cpp

示例15: OnSize

void CPlayerWnd::OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd)
{
	if ( bActivate )
	{
		wndPanel.SetParent( this );
		OnSize( SIZE_INTERNAL, 0, 0 );
	}
	
	CChildWnd::OnMDIActivate( bActivate, pActivateWnd, pDeactivateWnd );
}
开发者ID:pics860,项目名称:callcenter,代码行数:10,代码来源:wndplayer.cpp


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