F*e
2 楼
How can I get all the windows on my screen? Or get the window location/size if
I have the name, etc? Thanks a lot.
Is this possible in Java?
I have the name, etc? Thanks a lot.
Is this possible in Java?
t*s
5 楼
1. write a EnumWindowsProc callback function
2. call EnumWindows(...) and pass your callback function to it.
3. you will get a window handle in the callback funtion
4. with the handle (hWnd), you can get what you want about the window
for example:
RECT rc;
GetWindowRect(hWnd, &rc);
int height = rc.bottom - rc.top;
int width = rc.right - rc.left;
for more details, please search the msdn
【在 F**e 的大作中提到】
: Thanks! Can you give me some points to such Windows API?
:
: location/size if
2. call EnumWindows(...) and pass your callback function to it.
3. you will get a window handle in the callback funtion
4. with the handle (hWnd), you can get what you want about the window
for example:
RECT rc;
GetWindowRect(hWnd, &rc);
int height = rc.bottom - rc.top;
int width = rc.right - rc.left;
for more details, please search the msdn
【在 F**e 的大作中提到】
: Thanks! Can you give me some points to such Windows API?
:
: location/size if
F*e
6 楼
That's very helpful. Thanks. I'll try that. How about on unix/linux?
【在 t*****s 的大作中提到】
: 1. write a EnumWindowsProc callback function
: 2. call EnumWindows(...) and pass your callback function to it.
: 3. you will get a window handle in the callback funtion
: 4. with the handle (hWnd), you can get what you want about the window
: for example:
: RECT rc;
: GetWindowRect(hWnd, &rc);
: int height = rc.bottom - rc.top;
: int width = rc.right - rc.left;
: for more details, please search the msdn
【在 t*****s 的大作中提到】
: 1. write a EnumWindowsProc callback function
: 2. call EnumWindows(...) and pass your callback function to it.
: 3. you will get a window handle in the callback funtion
: 4. with the handle (hWnd), you can get what you want about the window
: for example:
: RECT rc;
: GetWindowRect(hWnd, &rc);
: int height = rc.bottom - rc.top;
: int width = rc.right - rc.left;
: for more details, please search the msdn
相关阅读
JavaFX那个透明着色的问题现在居然这样了!版主,今天有月饼吃吗?Java 有类似 leetcode那样子的网站吗?求教Java certificate 考试java和c有帮助嘛?amazon ec2 host网站的域名能改吗?goodbug, aws上怎么实现web server,app server分离,2个firewall的?问JavaFX的一个问题这VM CPU太weak怎么Identify?一般来说多大的数据量可以称为海量数据呢?mac不需要下载安装JDK,那还需要建立新的executable path么?疯了!J2EE应该到哪里找工作?groovy主要的问题是什么?Coursera course: Principles of Reactive Programming问个linux的问题请教一个htmlunit的问题请问高手:thrift 要通过什么连database 比如 mysql ?【title到底重不重要?】Spring例子求解释mac上怎么连tomcat和mysql?