avatar
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?
avatar
z*g
3
java不能直接获得这些windows的信息吧。
除非用jni调用windows的API。

【在 F**e 的大作中提到】
: 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?

avatar
F*e
4
Thanks! Can you give me some points to such Windows API?

location/size if

【在 z****g 的大作中提到】
: java不能直接获得这些windows的信息吧。
: 除非用jni调用windows的API。

avatar
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

avatar
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

avatar
t*s
7
sorry, i have no experience in x window

【在 F**e 的大作中提到】
: That's very helpful. Thanks. I'll try that. How about on unix/linux?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。