SPY++ 学习总结
生活随笔
收集整理的這篇文章主要介紹了
SPY++ 学习总结
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
spy++使用方法
分步閱讀
spy++ 是微軟 Visual Studio 編譯器自帶的一款工具。它可以顯示系統對象(包括進程、線程和
窗口)之間關系的圖形樹,搜索指定的窗口、線程、進程或消息, 查看選定的窗口、線程、進程
或消息的屬性等等。因此,在 spy++ 的幫助下,我們進行程序調試將容易得多。?
下面,我們通過一個簡單的示例,來教大家如何使用 spy++ 查看指定窗口的屬性。
方法/步驟
1
用 VS 打開一個工程,點擊啟動按鈕。程序運行后,顯示一個窗口。
2
點擊 VS 菜單“工具” - “spy++”,啟動 spy++。。
s
3
點擊 spy++ 工具欄中的 望遠鏡 圖標,彈出一個“窗口搜索”的對話框。在“窗口搜索”對話框
中,鼠標左鍵在 查找程序工具 后面的 圖標 處按下不放,將此圖標拖移到我們想要知道信息的窗
口內,再松開鼠標。
4
此時,“窗口搜索”對話框內將顯示該要查找信息的窗口的句柄、標題和類名。查看完畢后,單擊
確定。
5
“窗口搜索”對話框關閉后,spy++ 將高亮顯示我們要查找信息的窗口。如果該窗口是一個父窗
口(即它還包含子窗口),則前面會有 + 號。點擊 + 號展開,可以查看它包含的子窗口信息。
6
如果想查看某個子窗口的信息,則可以在該子窗口行右擊鼠標,選擇 屬性,彈出 屬性檢查器 窗口
。
7
在屬性檢查器窗口中,該窗口的大小位置坐標、樣式(含擴展樣式)、窗口句柄(含父窗口句柄等
)、所屬類(包括窗口類名、實例句柄、圖標、光標句柄等信息)、進程(包含進程ID和線程ID
)信息就一覽無余了。
========
Spy++ —— 窗口、消息查看分析利器
http://blog.csdn.net/dpsying/article/details/519139471簡介
2下載地址
3使用場景
4使用方法
1,簡介
Microsoft Spy++是一個非常好的查看Windows操作系統的窗口、消息、進程、線程信息的工具
,簡單易用,功能強大。
2,下載地址
百度網盤:http://pan.baidu.com/s/1skMJUkH
3,使用場景
(1)我經常用來查詢一個不知道從哪里彈出來的廣告窗口是哪個進程搞的鬼……然后干掉
(2)枚舉所有窗口,查看父子關系,搜索某個窗口是否存在
(3)查詢一個窗口(包括隱藏窗口)的屬性,包括標題、類名、位置、進程線程
(4)通過分析其他軟件的窗口消息,輔助研究其內部實現原理
(5)分析某窗口的消息參數,給其發送冒充消息,以實現特殊的功能
4,使用方法
1,默認界面 可查看所有頂層窗口,展開可顯示子窗口。
2,右鍵窗口,選擇“消息”,可打開該窗口的消息查看窗口。里面實時顯示當前消息。
3,顯示一個窗口位置。
右鍵窗口,選擇“突出顯示”,之后該窗口的邊界會閃爍幾次,讓你輕易地發現它的位置。
如果沒有閃爍,那么也可以通過點擊“屬性”,顯示出該窗口的位置屬性,然后在屏幕上根據該位
置大致判斷出是哪個窗口。
突出顯示和查看屬性:
4,如果需要分析桌面的某一個存在的窗口屬性,點擊工具條的第5個按鈕(如下圖),將彈出界
面里的圓圈拖到該窗口上。則該窗口屬性顯示出來。
如圖,查看任務欄中間的子窗口屬性:
5,選擇工具條第6個按鈕,可以在窗口列表中直接定位到該窗口顯示。
如圖,直接定位到任務欄的子窗口“顯示運行的程序”。
6,查看窗口的消息時,可以設置一些條件和格式。
可以設置是否查看父窗口、子窗口、同一進程、同一線程、系統中所有窗口的消息。
可以設置哪些消息類型。(“消息選項”界面第2個TAB頁“消息”)
可以設置輸出哪些內容。(“消息選項”界面第3個TAB頁“輸出”)
========
spy++
Spy++ (SPYXX.EXE) 是一個基于 Win32 的實用工具,它提供系統的進程、線程、窗口和窗口消
息的圖形視圖。使用 Spy++ 可以執行下列操作: 顯示系統對象(包括進程、線程和窗口)之間
關系的圖形樹。 搜索指定的窗口、線程、進程或消息。 查看選定的窗口、線程、進程或消息的屬
性。
中文名 spy++ 基 ? ?于 ?Win32 最新版本支持 Win64 提供系統進程、線程、窗口
目錄
1 簡介
2 實際應用
? 激活灰色按鈕:
? 監視IE上網記錄:
簡介
直接從視圖中選擇窗口、線程、進程或消息。 通過鼠標定位,使用查找程序工具選擇窗口。 使用
復雜的消息日志選擇參數設置消息選項。 提示使用 Spy++ 時,在許多實例中都可以單擊鼠標右
鍵顯示常用命令的彈出式菜單。命令是否可用取決于指針的位置。例如,如果在指向窗口視圖中的
某項時單擊并且選定的窗口可見,則彈出式“突出顯示”菜單項將導致選定窗口的邊框閃爍,從而
可以輕松地在屏幕上找到該窗口。
Spy++ Lite是一款強有力的編程輔助工具,對分析窗體結構有獨到之處。可以以十六進制和十進
制兩種不同方式顯示窗口句柄等所有數值。本軟件還可以簡單調節窗口的狀態和形為,如是否可見
,是否可用,最大化,激活等。除此以外,您還可以把它當作一個截圖的小工具來用。
實際應用
下面舉兩個例子來小試牛刀:
激活灰色按鈕:
打開任一文件的屬性窗口,它的右下角處“應用”按鈕都是不可用的(灰色的)。拖動本軟件的探
測器指針選中該按鈕。切換至“消息”標簽頁,勾選“窗口可用”。看到了吧?“應用”按鈕被我
們激活了。
監視IE上網記錄:
用本軟件的探測器指針選中IE的地址欄。看到它的窗口類名為Edit;切換至“窗口”標簽頁,點擊
“父窗口”標簽,使父窗口成為當前窗口;切換到“類”標簽頁,看到其類名為ComboBox;再
依照上步點擊,將得到父窗口類名依次是ComboBoxEx32、ReBarWindow32、WorkerW,直到
最外層的IEFrame。此時再點擊“子窗口列表”按鈕,依次雙擊子窗口,看看能否找到地址欄Edit
。窗體結構清楚了,我們就不難用FindWindowEx、SendMessage、GetClassName、
GetWindowText等幾個API函數來監視上網記錄了。
========
Spy++的使用方法及下載
http://blog.csdn.net/whatday/article/details/7985922以spy++這個軟件為主,介紹下窗體句柄和使用按鍵插件時
,如果對這個句柄發送消息,即所謂的后臺掛機。
spy++這個軟件來自VC++,裝好VC后,就可以在工具中看到。
我們以“記事本”為例,看看如果給記事本發送按鍵消息。
首先啟動記事本
隨后啟動SPY++
使用spy++的查找功能
點開后的效果
我們把黑色準星拖動到記事本窗體上
然后點擊“確定”,看到了SPY++已經顯示了下圖紅色的內容。
這三個句柄從上到下依次是:
記事本的主句柄
文字輸入框的句柄
狀態欄的句柄
我們要給記事本發送按鍵消息,就要選對發送對象(句柄),這里顯然,我們要發送給“文字輸入
框”。我們雙擊“文字輸入框”這里,可以看到“窗口標題”、“窗口大小”、“窗口位置”等信
息。點擊“類”選項卡,查看下類名是什么,代碼里需要類名做參數
好了,基本的數據都有了,下面給出的代碼:
[plain] view plain copy
//打開記事本 ?
VBSCall RunApp("notepad.exe") ?
//等待記事本完全打開 ?
Delay 100 ?
//得到當前窗口句柄 ?
dim hwnd ?
Plugin hwnd=Window.Foreground() ?
//查找當前窗口下的子句柄 ?
dim edithwnd ?
Plugin edithwnd=Window.FindEx(hwnd,0,"Edit",0) ?
//發送字符串消息 ?
Plugin Window.SendString(edithwnd, "看我發送字符串消息") ?
//發送回車 ?
Plugin Window.SendKeyDown(edithwnd,13) ?
//發送鍵盤消息 ?
Plugin Window.SendKeyDown(edithwnd,asc("1")) ?
========
Introducing Spy++
https://msdn.microsoft.com/en-us/library/dd460756.aspxVisual Studio 2015 Other Versions?
?
Spy++ lets you perform the following tasks:
Display a graphical tree of relationships among system objects. These include processes,?
threads, and windows.
Search for specified windows, threads, processes, or messages.
View the properties of selected windows, threads, processes, or messages.
Select a window, thread, process, or message directly in the view.
Use the Finder Tool to select a window by mouse pointer positioning.
Set message options by using complex message log selection parameters.
Spy++ has a toolbar and hyperlinks to help you work faster. It also provides a Refresh?
command to update the active view, a Window Finder Tool to make spying easier, and a?
Font dialog box to customize view windows. Additionally, Spy++ lets you save and restore?
user preferences.
In various Spy++ windows, you can right-click to display a shortcut menu of frequently?
used commands. Which commands are displayed depends on where the pointer is. For?
example, if you right-click an entry in the Window view and the selected window is visible,?
then clicking Highlight on the shortcut menu causes the border of the selected window?
to flash so that it can be located more easily.
System_CAPS_noteNote
There are two other utilities that resemble Spy++: PView, which shows details about?
processes and threads, and DDESPY.EXE, which lets you monitor Dynamic Data Exchange?
(DDE) messages.
64-Bit Operating Systems
There are two versions of Spy++. The first version, named Spy++ (spyxx.exe), is designed?
to display messages sent to a window that is running in a 32-bit process. For example,?
Visual Studio runs in a 32-bit process. Therefore, you can use Spy++ to display messages?
sent to Solution Explorer. Because the default configuration for most builds in Visual?
Studio is to run in a 32-bit process, this first version of Spy++ is the one that is available?
on the Tools menu in Visual Studio.
The second version, named Spy++ (64-bit) (spyxx_amd64.exe), is designed to display?
messages sent to a window that is running in a 64-bit process. For example, on a 64-bit?
operating system, Notepad runs in a 64-bit process. Therefore, you can use Spy++ (64-
bit) to display messages sent to Notepad. Spy++ (64-bit) is typically located in
..\Visual Studio installation folder\Common7\Tools\spyxx_amd64.exe.
You can run either version of Spy++ directly from the command line.
System_CAPS_noteNote
Although the Spy++ (64-bit) file name contains "amd", it runs on any x64 Windows?
operating system.
See Also
Using Spy++
Spy++ Views
Spy++ Reference
========
autohotkey 如何使用window
分步閱讀
如何使用window spy
工具/原料
autohotkey
方法/步驟
1
打開任意.ahk腳本
2
右擊該腳本的托盤圖標,點擊“window spy”
3
彈出“window spy”窗口
4
在某窗體上點一下,就可以看到該窗體的一些信息(如:窗體標題、鼠標的位置等)
5
提取需要的信息利用。
注意事項
有些窗體的控件的信息、或某些信息是獲取不了的
========
Spy++ Reference
https://msdn.microsoft.com/en-us/library/dd460732.aspxVisual Studio 2015 Other Versions?
?
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC?
Documentation.
See the sections listed below for descriptions of each Spy++ menu and dialog box:
In This Section
Menu Commands
Describes the commands available on each Spy++ menu.
Font Dialog Box
Used to configure the character font used in a Spy++ Views window.
Search Tools for Spy++ Views
Dialog boxes used to find a specific node in a Spy++ Views window.
Window Properties Dialog Box
Used to display the properties of a window selected in Windows view.
Message Options Dialog Box
Used to select which messages are listed in Messages view.
Message Properties Dialog Box
Used to display the properties of a message selected in Messages view.
Process Properties Dialog Box
Used to display the properties of a process selected in Processes view.
Thread Properties Dialog Box
Used to display the properties of a thread selected in Threads view.
Other Dialog Boxes
Used to display information about the Spy++ program.
Related Sections
Using Spy++
Introduces the Spy++ tool and explains how it can be used.
Spy++ Views
Explains the Spy++ tree views of windows, messages, processes, and threads.
========
總結
以上是生活随笔為你收集整理的SPY++ 学习总结的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VC++调试技巧学习总结
- 下一篇: ODBC API 学习总结