您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetWindowPlacement函数代码示例

51自学网 2021-06-01 21:17:57
  C++
这篇教程C++ GetWindowPlacement函数代码示例写得很实用,希望能帮到您。

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

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

示例1: GetWindowPlacement

void DX10App::Start(){	if(!mShowMouse)	{		WINDOWPLACEMENT wPos;		GetWindowPlacement( hMainWnd, &wPos );		SetCursorPos(wPos.rcNormalPosition.left + 100, wPos.rcNormalPosition.top + 100);	}	mSwapBuffers->begin();		//gDevice->ClearDepthStencilView( mSwapBuffers->getRenderTargets()->DSV, D3D10_CLEAR_DEPTH|D3D10_CLEAR_STENCIL, 1.0f, 0);	float blendFactor[] = {0.0f, 0.0f, 0.0f, 0.0f};	gDevice->OMSetBlendState(0, blendFactor, 0xffffffff);}
开发者ID:GustavPersson,项目名称:miniature-dubstep,代码行数:17,


示例2: AfxGetApp

void CMainFrame::OnClose() {	// TODO: Add your message handler code here and/or call default	CMyCommApp * myApp = (CMyCommApp *)AfxGetApp();	AfxGetApp()->WriteProfileString("Version","VER",myApp->m_AppVersion);	WINDOWPLACEMENT   WndStatus;  	GetWindowPlacement(&WndStatus);  	AfxGetApp()->WriteProfileInt("Layout","FLAG",WndStatus.flags);  	AfxGetApp()->WriteProfileInt("Layout","SHOWCMD",WndStatus.showCmd);  	AfxGetApp()->WriteProfileInt("Layout","LEFT",WndStatus.rcNormalPosition.left);  	AfxGetApp()->WriteProfileInt("Layout","RIGHT",WndStatus.rcNormalPosition.right);  	AfxGetApp()->WriteProfileInt("Layout","TOP",WndStatus.rcNormalPosition.top);  	AfxGetApp()->WriteProfileInt("Layout","BOTTOM",WndStatus.rcNormalPosition.bottom); 		CFrameWnd::OnClose();}
开发者ID:liquanhai,项目名称:LSDComm,代码行数:17,


示例3: SetWindowLongPtr

LRESULT CALLBACK CWindow::stWinMsgHandler(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){    CWindow * pWnd = nullptr;    if (uMsg == WM_NCCREATE)    {        // get the pointer to the window from lpCreateParams which was set in CreateWindow        SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)((LPCREATESTRUCT(lParam))->lpCreateParams));    }    // get the pointer to the window    pWnd = GetObjectFromWindow(hwnd);    // if we have the pointer, go to the message handler of the window    // else, use DefWindowProc    if (pWnd)    {        switch (uMsg)        {        case WM_ACTIVATE:            if ((wParam == WA_ACTIVE)&&(!pWnd->bWindowRestored)&&(!pWnd->sRegistryPath.empty()))            {                WINDOWPLACEMENT wpl = {0};                DWORD size = sizeof(wpl);                if (SHGetValue(HKEY_CURRENT_USER, pWnd->sRegistryPath.c_str(), pWnd->sRegistryValue.c_str(), REG_NONE, &wpl, &size) == ERROR_SUCCESS)                    SetWindowPlacement(hwnd, &wpl);                else                    ShowWindow(hwnd, SW_SHOW);                pWnd->bWindowRestored = true;            }            break;        case WM_CLOSE:            if (!pWnd->sRegistryPath.empty())            {                WINDOWPLACEMENT wpl = {0};                wpl.length = sizeof(WINDOWPLACEMENT);                GetWindowPlacement(hwnd, &wpl);                SHSetValue(HKEY_CURRENT_USER, pWnd->sRegistryPath.c_str(), pWnd->sRegistryValue.c_str(), REG_NONE, &wpl, sizeof(wpl));            }            break;        }        return pWnd->WinMsgHandler(hwnd, uMsg, wParam, lParam);    }    else        return DefWindowProc(hwnd, uMsg, wParam, lParam);}
开发者ID:hfeeki,项目名称:TortoiseGit,代码行数:46,


示例4: force_normal

void force_normal(HWND hwnd){    static int recurse = 0;    WINDOWPLACEMENT wp;    if (recurse)	return;    recurse = 1;    wp.length = sizeof(wp);    if (GetWindowPlacement(hwnd, &wp) && wp.showCmd == SW_SHOWMAXIMIZED) {	wp.showCmd = SW_SHOWNORMAL;	SetWindowPlacement(hwnd, &wp);    }    recurse = 0;}
开发者ID:autoandshare,项目名称:putty-toolpakcloud,代码行数:17,


示例5: CDialogManage

/*** Dialog procedure for the Manage dialog.***/INT_PTR CALLBACK CDialogManage::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){	if (!c_Dialog)	{		if (uMsg == WM_INITDIALOG)		{			c_Dialog = new CDialogManage(hWnd);			return c_Dialog->OnInitDialog(wParam, lParam);		}	}	else	{		switch (uMsg)		{		case WM_ACTIVATE:			return c_Dialog->OnActivate(wParam, lParam);		case WM_COMMAND:			return c_Dialog->OnCommand(wParam, lParam);		case WM_NOTIFY:			return c_Dialog->OnNotify(wParam, lParam);		case WM_CLOSE:			PostMessage(hWnd, WM_DELAYED_CLOSE, 0, 0);			return TRUE;		case WM_DESTROY:			delete c_Dialog;			c_Dialog = NULL;			return FALSE;		case WM_DELAYED_CLOSE:			GetWindowPlacement(hWnd, &c_WindowPlacement);			if (c_WindowPlacement.showCmd == SW_SHOWMINIMIZED)			{				c_WindowPlacement.showCmd = SW_SHOWNORMAL;			}			DestroyWindow(hWnd);			return TRUE;		}	}	return FALSE;}
开发者ID:JamesAC,项目名称:rainmeter,代码行数:49,


示例6: RedrawTitleBar

void RedrawTitleBar( HWND hWnd, bool active ){	if ( !pShared )		return;	WaitForSingleObject( CommMutex, INFINITE );	if ( pShared->TitleBar[0] == 0 )	{		ReleaseMutex( CommMutex );		return;	}	int len = (int)strlen( pShared->TitleBar );	if ( len >= 1024 )		len = 1023;	WINDOWPLACEMENT place;	RECT rect;	HDC hDC = GetWindowDC( hWnd );//WINDOW dc allows us to draw on the non client area		GetWindowPlacement( hWnd, &place );	GetWindowRect( hWnd, &rect );	// Change the coords (believe me, okay?)	rect.top = GetSystemMetrics(SM_CYFRAME);	rect.bottom = rect.top + GetSystemMetrics(SM_CYCAPTION);	rect.right = ( rect.right - rect.left ) - ( 4*GetSystemMetrics(SM_CXSIZE) + GetSystemMetrics(SM_CXFRAME) );	rect.left = GetSystemMetrics(SM_CXSIZEFRAME) + GetSystemMetrics(SM_CXSMICON) + 5;	if ( hThemes )	{		HTHEME hTheme = zOpenThemeData( hWnd, L"WINDOW" );		DrawColorTitleBar( hTheme, hWnd, hDC, active, place.showCmd == SW_MAXIMIZE, pShared->TitleBar, len, rect );		zCloseThemeData( hTheme );	}	else	{		rect.left += GetSystemMetrics(SM_CXFRAME);		DrawColorTitleBar( NULL, hWnd, hDC, active, place.showCmd == SW_MAXIMIZE, pShared->TitleBar, len, rect );	}	ReleaseDC( hWnd, hDC );	ReleaseMutex( CommMutex );}
开发者ID:WildGenie,项目名称:Razor,代码行数:45,


示例7: GetWindowPlacement

void Window::SaveWindowState(){    WINDOWPLACEMENT wp;    wp.length=sizeof(WINDOWPLACEMENT);    GetWindowPlacement(hWnd,&wp);    if (Flags & W_SAVESTATE)    {        char *temp="Normal";        BOOL RestToMax=wp.flags & WPF_RESTORETOMAXIMIZED;        if (wp.showCmd==SW_SHOWMAXIMIZED ||                ( wp.showCmd==SW_SHOWMINIMIZED && !(Flags & W_SAVEMIN) && RestToMax ) ) temp="Maximized";        else if ( (Flags & W_SAVEMIN) && (wp.showCmd==SW_SHOWMINIMIZED)) temp= RestToMax ? "MinFromMax" : "Minimized";        else if ( wp.showCmd==SW_HIDE) temp="Hidden";        WriteIniString(Name,"State",temp);    }    WriteIniString(Name,"Window",	String()<< (int) wp.rcNormalPosition.left << ',' << (int) wp.rcNormalPosition.top << ',' << (int) wp.rcNormalPosition.right  << ',' << (int) wp.rcNormalPosition.bottom);}
开发者ID:DavidKinder,项目名称:Level9,代码行数:18,


示例8: SaveWindowPosition

static INT_PTR SaveWindowPosition(WPARAM, LPARAM lParam){	SAVEWINDOWPOS *swp = (SAVEWINDOWPOS*)lParam;	WINDOWPLACEMENT wp;	char szSettingName[64];	wp.length = sizeof(wp);	GetWindowPlacement(swp->hwnd, &wp);	mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sx", swp->szNamePrefix);	db_set_dw(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.left);	mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sy", swp->szNamePrefix);	db_set_dw(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.top);	mir_snprintf(szSettingName, SIZEOF(szSettingName), "%swidth", swp->szNamePrefix);	db_set_dw(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.right-wp.rcNormalPosition.left);	mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sheight", swp->szNamePrefix);	db_set_dw(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.bottom-wp.rcNormalPosition.top);	return 0;}
开发者ID:martok,项目名称:miranda-ng,代码行数:18,


示例9: GetWindowPlacement

BOOL CDlgScraperOutput::DestroyWindow(){	WINDOWPLACEMENT		wp;	CMainFrame			*pMyMainWnd  = (CMainFrame *) (theApp.m_pMainWnd);	// Save settings to registry	GetWindowPlacement(&wp);	prefs.set_scraper_x(wp.rcNormalPosition.left);	prefs.set_scraper_y(wp.rcNormalPosition.top);	prefs.set_scraper_dx(wp.rcNormalPosition.right - wp.rcNormalPosition.left);	prefs.set_scraper_dy(wp.rcNormalPosition.bottom - wp.rcNormalPosition.top);	prefs.set_scraper_zoom(m_Zoom.GetCurSel());	// Uncheck scraper output button on main toolbar	pMyMainWnd->m_MainToolBar.GetToolBarCtrl().CheckButton(ID_MAIN_TOOLBAR_SCRAPER_OUTPUT, false);	return CDialog::DestroyWindow();}
开发者ID:buranela,项目名称:OpenHoldemV12,代码行数:18,


示例10: sizeof

void CAllToolSetupSheet::OnPaint() {	WINDOWPLACEMENT wp;	RECT rect;	wp.length = sizeof(WINDOWPLACEMENT);  //not sure if this is still required, but what the hey 	GetWindowPlacement(&wp);	if (InitDialogComplete && wp.showCmd!=SW_SHOWMAXIMIZED && wp.showCmd!=SW_SHOWMINIMIZED)  // save the dialog window position	{        GetWindowRect(&rect);		LastMoveX = rect.left;		LastMoveY = rect.top;		LastSizeX = rect.right - rect.left;		LastSizeY = rect.bottom - rect.top;	}	CMySheet::OnPaint();}
开发者ID:TomKerekes,项目名称:KMotionX,代码行数:18,


示例11: MonitorFromWindow

/*********************************************************************** *		MonitorFromWindow ([email
C++ GetWindowPort函数代码示例
C++ GetWindowLongPtrW函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。