How can I get the list of all opened windows? |
|
axsoft
版主 發表:681 回覆:1056 積分:969 註冊:2002-03-13 發送簡訊給我 |
資料來源:http://free.prohosting.com/~cbdn/ Applications such as WinSight 32® shipped in the C Builder package can retrieve the list of all opened windows and show their corresponding class. How can I do this in my own application?
1.
Start a new project using File | New Application.
2.
Add a ListView. Set its ViewStyle to vsReport. Edit the Columns property and add two columns. The first one will contain the
caption and the second one the class of the window.
3.
Declare the callback function by inserting the following in your source code:
|
sge
一般會員 發表:5 回覆:2 積分:1 註冊:2002-12-19 發送簡訊給我 |
各位高手前輩請教一下
如果用以上的這個方式得到了另一個視窗內的各個class name, 那我如何去使用它呢?比如說,
我得知另一個視窗有TEdit class,我想對它輸入一下數字,或有一個按鍵TButton,我想按下它,要如何才能作到? 我用::SendMessage(handle,WM_COMMAND,10,123); 可是我不知道這個TEdit的ID,
我用另一個函式 key_event(char)'a',0,0,0)就可以但是很麻煩,一次只能送一個字。 在這討論區上我找不到其它的例子,可能請高手提供個例子或指點指點
請不吝請指教,謝謝
|
tender
初階會員 發表:23 回覆:90 積分:37 註冊:2002-09-26 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |