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

C++ OnSize函数代码示例

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

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



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


示例16: rviewFrame

rviewLookScaleDialog::rviewLookScaleDialog(rmanClientApp *parentApp, const char *name, double scale) : rviewFrame(NULL, lman->lookup("titleLookScaleColl"), -1, -1, lkscale_width, lkscale_height)
{
    panel = new wxPanel(this, 0, 0, lkscale_width, lkscale_height);
    panel->SetLabelPosition(wxVERTICAL);
    collName = new rviewText(panel, name);
    scaleString = new rviewText(panel, scale);
    okBut = new rviewButton(panel);
    cancelBut = new rviewButton(panel);
    parent = parentApp;
    label();

    frameWidth=-1;
    frameHeight=-1;

    OnSize(lkscale_width, lkscale_height);
    OnSize(lkscale_width, lkscale_height);

    Show(TRUE);
}
开发者ID:akarmas,项目名称:rasdaman,代码行数:19,代码来源:rviewApp.cpp


示例17: switch

BOOL CLayoutManager::OnWndMsg(UINT message, 
                              WPARAM wParam, LPARAM lParam, 
                              LRESULT * pResult,
			      BOOL bPeek)
{
	int i;
	
	if (! m_bActive)
		return FALSE;

	switch (message)
	{
	case WM_GETMINMAXINFO:
		if (! bPeek)
		{
			MINMAXINFO * pMMI = (LPMINMAXINFO) lParam;
			pMMI->ptMinTrackSize.x = m_dwMinWidth;
			pMMI->ptMinTrackSize.y = m_dwMinHeight;
		}
		break;

	case WM_NCCALCSIZE:
		if (wParam)
			OnNcCalcSize(bPeek, (LPNCCALCSIZE_PARAMS)lParam, pResult);
		break;

	case WM_ERASEBKGND:
		OnEraseBkgnd(bPeek, (HDC)wParam);
		break;

	case WM_SIZE:
		if (! bPeek)
			OnSize(LOWORD(lParam), HIWORD(lParam));
		break;

	case WM_MOVING:
		if (bPeek)
		{
			OnMoving(wParam, (RECT*)lParam); 
			*pResult = TRUE;
			return TRUE;
		}
		break;

	case WM_ENTERSIZEMOVE:
	case WM_EXITSIZEMOVE:
		if (! bPeek)
			break;
		for (i=0; i<m_vControls.size(); i++)
			m_vControls[i].pWnd->SendMessage(message, wParam, lParam);
		break;
	}

	return FALSE;
}
开发者ID:apankrat,项目名称:yafe,代码行数:55,代码来源:LayoutManager.cpp


示例18: GetClientRect

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

	GetClientRect( &rcClient );
	rcClient.left += m_nTreeSize + Settings.Skin.Splitter;
	rcClient.top += Settings.Skin.ToolbarHeight + m_nHeaderSize;
	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_nPanelSize - 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_nPanelSize )
		{
			m_nPanelSize = nSplit;
			OnSize( 1982, 0, 0 );
			Invalidate();
		}
	}

	ReleaseCapture();
	ClipCursor( NULL );

	return TRUE;
}
开发者ID:GetEnvy,项目名称:Envy,代码行数:55,代码来源:CtrlLibraryFrame.cpp


示例19: ENSURE

BOOL CSnapView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
	DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
	ENSURE(pParentWnd != NULL);
	ASSERT_KINDOF(CFrameWnd, pParentWnd);

	if (!CWnd::Create(lpszClassName, lpszWindowName, dwStyle | WS_CLIPCHILDREN,
		rect, pParentWnd, nID, pContext))
	{
		return FALSE;
	}

	// add your pages here!

	m_pPageBkfst = new CBkfstPage;
	m_pPageLunch = new CLunchPage;
	m_pPageDinner = new CDinnerPage;

	// create the window object

	m_pPropSheet = new CSnapPropertySheet;
	m_pPropSheet->AddPage(m_pPageBkfst);
	m_pPropSheet->AddPage(m_pPageLunch);
	m_pPropSheet->AddPage(m_pPageDinner);

	// create a modeless property page
	if (!m_pPropSheet->Create(this,
			DS_CONTEXTHELP | DS_SETFONT | WS_CHILD | WS_VISIBLE))
	{
		DestroyWindow();
		return FALSE;
	}

	m_pPropSheet->SetWindowPos(NULL, 0, 0, 0, 0,
			SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE);

	// we use the style from the template - but make sure that
	// the WS_BORDER bit is correct.
	// the WS_BORDER bit will be whatever is in dwRequestedStyle

	m_pPropSheet->ModifyStyle(WS_BORDER|WS_CAPTION,
		dwStyle & (WS_BORDER|WS_CAPTION));

	// Force the size requested.
	// Fake a call to OnSize()--it would have been called automatically
	// if this were using the base class implementation of Create().

	CFrameWnd* pParentFrame = GetParentFrame();
	CRect rectSize;
	m_pPropSheet->GetWindowRect(rectSize);
	pParentFrame->CalcWindowRect(rectSize);
	OnSize(SIZE_RESTORED, rectSize.Width(), rectSize.Height());

	return TRUE;
}
开发者ID:jetlive,项目名称:skiaming,代码行数:55,代码来源:snapview.cpp


示例20: switch

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 打开文件对话框回调函数
UINT_PTR CALLBACK COpenDlg::OpenDlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	UINT i;
	POINT ptPoint;

	switch (uMsg)
	{
	case WM_INITDIALOG:
		m_hWnd = hWnd;
		m_hParent = GetParent(m_hWnd);
		OnInitDialog();
		break;

	case WM_NOTIFY:
		return OnNotify(wParam, lParam);

	case WM_SIZE:
		OnSize();
		break;

	case WM_COMMAND:
		OnCommand(wParam, lParam);
		break;

	case WM_PAINT:
		OnPaint();
		break;

	case WM_LBUTTONDOWN:
		if (CanPreview())
		{
			ptPoint.x = LOWORD(lParam);
			ptPoint.y = HIWORD(lParam);
			if (PtInRect(&m_rtPreview, ptPoint))
			{
				m_pWnd->StepFrame((wParam & MK_CONTROL) ? -1 : 1);
			}
		}
		break;

	case WM_NCDESTROY:
		for (i = 0; i < _NumOf(m_hImageLists); i++)
		{
			ImageList_Destroy(m_hImageLists[i]);
		}
		if (m_hFormatMenu)
		{
			DestroyMenu(m_hFormatMenu);
			m_hFormatMenu = NULL;
		}
		break;
	}

	return 0;
}
开发者ID:oddstone,项目名称:RawPlayer,代码行数:57,代码来源:OpenDlg.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ OnStart函数代码示例发布时间:2022-05-30
下一篇:
C++ OnSameTeam函数代码示例发布时间: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