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
相关阅读
有没有好的Hibernate教程?Fatal Error怎么回事?Java里面的SWT或者Swing为啥还有书在介绍呢请问,哪位可以发我一份SCJP新的题库?是不是spring mvc用的很少你们写shopping cart,用spring,hibernate都是接触了java几年后学会的?你们觉得一家公司anyone using play framework (from Typesafe)?谁深入解答一下Java的Reflection机制programming那帮人好好玩啊yourkit licensejava web start的奇异问题rest vs soap (转载)求教一个Java问题 IllegalMonitorStateException遇到Swing的一个问题已毕业在找工作,看不到希望, 求refer,求信息,感谢!Hibernate的优势具体体现在哪里?Free Coursera course: Algorithms, Part I started终于得到理想的职位了 (转载)很久没看到魔肥出来指点了