[英]How do I place my app window in a certain position in the desktop window hierarchy on Windows using win32 api?
[英]How do I find the position of my Dialog Window on the desktop?
我正在寻找相对于“桌面窗口”相对于自身的“对话窗口”坐标?
以下两个都不满足我的需求。 刚从0,0开始
定义从0,0开始的Dialog窗口的尺寸
HWND hWnd = ::GetForegroundWindow();
::GetClientRect(hWnd, &rectWin);
c.Format("%d %d %d %d", rectWin.top, rectWin.bottom, rectWin.left, rectWin.right);
MessageBox(c);
定义从0,0开始的Desktop窗口的尺寸
HWND hWnd = ::GetDesktopWindow();
::GetClientRect(hWnd, &rectWin);
c.Format("%d %d %d %d", rectWin.top, rectWin.bottom, rectWin.left, rectWin.right);
MessageBox(c);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.