由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Get windows info
相关主题
SkylineJ2EE & Windows XP Home Edition
火车旅行家在中文WINDOWS下无法运行的大问题已被解决get the default printer name from windows
Re: a Stupid question.jconsole does't list any local java process on Windows xp
Re: 怎么看jar里面有什么?哪位在VMWare里面安装过Tomcat
open a new IE window with now frameHow to make JBoss or Tomcat to be a service?
安装JAVA中的问题?如何做windows安装程序包 (转载)
help about javascript new window(post)没有java命令怎么执行jar文件阿?
java Socket different in Windows and Linset this "window > preference " visible for Eclipse 3.5
相关话题的讨论汇总
话题: get话题: windows话题: window话题: java话题: callback
进入Java版参与讨论
1 (共1页)
F**e
发帖数: 593
1
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?
z****g
发帖数: 2497
2
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?

F**e
发帖数: 593
3
Thanks! Can you give me some points to such Windows API?

location/size if

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

t*****s
发帖数: 124
4
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

F**e
发帖数: 593
5
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
发帖数: 124
6
sorry, i have no experience in x window

【在 F**e 的大作中提到】
: That's very helpful. Thanks. I'll try that. How about on unix/linux?
1 (共1页)
进入Java版参与讨论
相关主题
set this "window > preference " visible for Eclipse 3.5open a new IE window with now frame
Can i install 32bit JVM on windows 7 64bit?安装JAVA中的问题?
java 如何入门help about javascript new window(post)
码农们站出来, 讨论个技术问题, 一般的web site真的能获取mac (转载)java Socket different in Windows and Lin
SkylineJ2EE & Windows XP Home Edition
火车旅行家在中文WINDOWS下无法运行的大问题已被解决get the default printer name from windows
Re: a Stupid question.jconsole does't list any local java process on Windows xp
Re: 怎么看jar里面有什么?哪位在VMWare里面安装过Tomcat
相关话题的讨论汇总
话题: get话题: windows话题: window话题: java话题: callback