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

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

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

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

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

示例1: al

void LocalUpdateHandler::updateVideoRegion(){  ServerConfig *srvConf = Configurator::getInstance()->getServerConfig();  unsigned int interval = srvConf->getVideoRecognitionInterval();  DateTime curTime = DateTime::now();  if ((curTime - m_lastVidUpdTime).getTime() > interval) {    m_lastVidUpdTime = DateTime::now();    m_vidRegion.clear();    AutoLock al(srvConf);    StringVector *classNames = srvConf->getVideoClassNames();    std::vector<HWND> hwndVector;    std::vector<HWND>::iterator hwndIter;    WindowFinder::findWindowsByClass(classNames, &hwndVector);    for (hwndIter = hwndVector.begin(); hwndIter != hwndVector.end(); hwndIter++) {      HWND videoHWND = *hwndIter;      if (videoHWND != 0) {        WINDOWINFO wi;        wi.cbSize = sizeof(WINDOWINFO);        if (GetWindowInfo(videoHWND, &wi)) {          Rect videoRect(wi.rcClient.left, wi.rcClient.top,                         wi.rcClient.right, wi.rcClient.bottom);          videoRect.move(-GetSystemMetrics(SM_XVIRTUALSCREEN),                         -GetSystemMetrics(SM_YVIRTUALSCREEN));          m_vidRegion.addRect(&videoRect);        }      }    }  }}
开发者ID:sim0629,项目名称:tightvnc,代码行数:32,


示例2: winDialogGetWindowDecor

static void winDialogGetWindowDecor(Ihandle* ih, int *border, int *caption, int menu){  WINDOWINFO wi;  wi.cbSize = sizeof(WINDOWINFO);  GetWindowInfo(ih->handle, &wi);  *border = wi.cxWindowBorders;  if (wi.rcClient.bottom == wi.rcClient.top ||       wi.rcClient.top > wi.rcWindow.bottom ||      wi.rcClient.bottom > wi.rcWindow.bottom)  {    if (wi.dwStyle & WS_CAPTION)    {      if (wi.dwExStyle & WS_EX_TOOLWINDOW)        *caption = GetSystemMetrics(SM_CYSMCAPTION); /* tool window */      else        *caption = GetSystemMetrics(SM_CYCAPTION);   /* normal window */    }    else      *caption = 0;  }  else  {    /* caption = window height - borders - client height - menu */    *caption = (wi.rcWindow.bottom-wi.rcWindow.top) - 2*wi.cyWindowBorders - (wi.rcClient.bottom-wi.rcClient.top) - menu;   }}
开发者ID:ivanceras,项目名称:iup-mirror,代码行数:28,


示例3: winDialogGetActiveWindowAttrib

static char* winDialogGetActiveWindowAttrib(Ihandle* ih){  WINDOWINFO wininfo;  wininfo.cbSize = sizeof(WINDOWINFO);  GetWindowInfo(ih->handle, &wininfo);  return iupStrReturnBoolean (wininfo.dwWindowStatus & WS_ACTIVECAPTION); }    
开发者ID:ivanceras,项目名称:iup-mirror,代码行数:7,


示例4: GetWindowInfo

	void Window::HandleSizeMessage()	{		WINDOWINFO info;		GetWindowInfo(m_handle, &info);		bool resized = false;		if (GetRectWidth(info.rcClient) != GetRectWidth(m_clientRect))			resized = true;		else if (GetRectHeight(info.rcClient) != GetRectHeight(m_clientRect))			resized = true;		m_clientRect = info.rcClient;		m_windowRect = info.rcWindow;						if (resized)		{			unsigned int clientWidth = GetClientWidth();			unsigned int clientHeight = GetClientHeight();			unsigned int windowWidth = GetWindowWidth();			unsigned int windowHeight = GetWindowHeight();			for (size_t i = 0; i < m_eventListeners.size(); ++i)			{				m_eventListeners[i]->WindowResized(clientWidth, clientHeight, windowWidth, windowHeight);			}		}	}
开发者ID:rarosu,项目名称:WarSettlers,代码行数:27,


示例5: RKMDIWindow

RKCaughtX11Window::RKCaughtX11Window (WId window_to_embed, int device_number) : RKMDIWindow (0, X11Window) {	RK_TRACE (MISC);	commonInit (device_number);	embedded = window_to_embed;#ifdef Q_WS_WIN	// unfortunately, trying to get KWindowInfo as below hangs on windows (KDElibs 4.2.3)	WINDOWINFO wininfo;	wininfo.cbSize = sizeof (WINDOWINFO);	GetWindowInfo (embedded, &wininfo);	// clip off the window frame and menubar	xembed_container->setContentsMargins (wininfo.rcWindow.left - wininfo.rcClient.left, wininfo.rcWindow.top - wininfo.rcClient.top,				wininfo.rcClient.right - wininfo.rcWindow.right, wininfo.rcClient.bottom - wininfo.rcWindow.bottom);	// set a fixed size until the window is shown	xembed_container->setFixedSize (wininfo.rcClient.right - wininfo.rcClient.left, wininfo.rcClient.bottom - wininfo.rcClient.top);	setGeometry (wininfo.rcClient.left, wininfo.rcClient.right, wininfo.rcClient.top, wininfo.rcClient.bottom);	// see comment in X11 section	move (wininfo.rcClient.left, wininfo.rcClient.top);		// else the window frame may be off scree on top/left.#elif defined Q_WS_X11	KWindowInfo wininfo = KWindowSystem::windowInfo (embedded, NET::WMName | NET::WMGeometry);	RK_ASSERT (wininfo.valid ());	// set a fixed size until the window is shown	xembed_container->setFixedSize (wininfo.geometry ().width (), wininfo.geometry ().height ());	setGeometry (wininfo.geometry ());	// it's important to set a size, even while not visible. Else DetachedWindowContainer will assign a default size of 640*480, and then size upwards, if necessary.	setCaption (wininfo.name ());#endif	// somehow in Qt 4.4.3, when the RKCaughtWindow is reparented the first time, the QX11EmbedContainer may kill its client. Hence we delay the actual embedding until after the window was shown.	// In some previous version of Qt, this was not an issue, but I did not track the versions.	QTimer::singleShot (0, this, SLOT (doEmbed()));}
开发者ID:KDE,项目名称:rkward,代码行数:33,


示例6: is_valid_window

static int is_valid_window(HWND hwnd){	WINDOWINFO wi;	wi.cbSize = sizeof(wi);	GetWindowInfo(hwnd, &wi);	return (wi.dwStyle & WS_VISIBLE) && !(wi.dwExStyle & WS_EX_TOOLWINDOW);}
开发者ID:abhisheknair,项目名称:virgo,代码行数:7,


示例7: maybeAddWindow

staticbool maybeAddWindow(HWND hwnd, std::vector<QRect> *windows) {    WINDOWINFO wi;    GetWindowInfo( hwnd, &wi );    RECT rect = wi.rcClient;#if 0    RECT rect;    GetWindowRect( hwnd, &rect );#endif    int width = rect.right - rect.left;    int height = rect.bottom - rect.top;    // For some reason, rect.left and rect.top are shifted by cxWindowBorders and cyWindowBorders pixels respectively     // in *every* case (for every window), but cxWindowBorders and cyWindowBorders are non-zero only in the     // biggest-window case, therefore we need to save the biggest cxWindowBorders and cyWindowBorders to adjust the rect later    cxWindowBorder = qMax(cxWindowBorder, wi.cxWindowBorders);    cyWindowBorder = qMax(cyWindowBorder, wi.cyWindowBorders);    if ( ( ( wi.dwStyle & WS_VISIBLE ) != 0 ) && (width >= minSize ) && (height >= minSize ) )    {        //QRect r( rect.left + 4, rect.top + 4, width, height); // 4 = max(wi.cxWindowBorders) = max(wi.cyWindowBorders)        QRect r(rect.left + cxWindowBorder, rect.top + cyWindowBorder, width, height);		if ( std::find( windows->begin(), windows->end(), r ) == windows->end() ) {            windows->push_back( r );            return true;                }    }    return false;}
开发者ID:KDE,项目名称:ksnapshot,代码行数:31,


示例8: draw_hilight_box

static void draw_hilight_box (HWND hWnd, HDC hdc, COOLBARITEMDATA* item){    int  l,r,t,b;     WINDOWINFO *info = (WINDOWINFO*)GetWindowInfo (hWnd);    DWORD color;    DWORD mainc = GetWindowElementAttr (hWnd, WE_MAINC_THREED_BODY);    l = item->RcTitle.left;    t = item->RcTitle.top;    r = item->RcTitle.right - 1;    b = item->RcTitle.bottom - 1;    color = info->we_rdr->calc_3dbox_color (mainc, LFRDR_3DBOX_COLOR_DARKER);    SetPenColor (hdc,            RGBA2Pixel (hdc, GetRValue (color), GetGValue (color),                 GetBValue (color), GetAValue (color)));    MoveTo (hdc, l, t);    LineTo (hdc, l, b);    MoveTo (hdc, r - 1, t);    LineTo (hdc, r - 1, b);    color = info->we_rdr->calc_3dbox_color (mainc, LFRDR_3DBOX_COLOR_LIGHTER);    SetPenColor (hdc,            RGBA2Pixel (hdc, GetRValue (color), GetGValue (color),                 GetBValue (color), GetAValue (color)));    MoveTo (hdc, l + 1, t);    LineTo (hdc, l + 1, b);    MoveTo (hdc, r, t);    LineTo (hdc, r, b);}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:30,


示例9: InitInstance

万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。