?? exports.h
字號(hào):
/*========================================================================
文件: exports.h
說(shuō)明:全局消息鉤子
時(shí)間:2004-09-15
編寫:oshj || oshj@21cn.com
環(huán)境:VC6.0/Win2000 Pro/SP4/1024*768
特別說(shuō)明:本程序目的是更改其他程序窗口的顯示內(nèi)容(如數(shù)值)。用枚舉主窗口
和子窗口的方法只能只能找到有句柄的控件,發(fā)消息進(jìn)行更改。對(duì)無(wú)句柄
的控件就無(wú)能為力了,在spy++里都無(wú)法枚舉Delphi/BCB/VB的label控件的
只能采用截獲TextOut的方法了,沒想到其他更好的辦法:-)這種就是
所謂的屏幕取詞技術(shù)了,金山詞霸用的就是這種方法。
=========================================================================*/
//-------------------------------------------------------------------------
#ifndef _INC_EXPORTS
#define _INC_EXPORTS
#include <windows.h>
#include <stdio.h>
//-------------------------------------------------------------------------
#define DLLEXPORT __declspec(dllexport)
//-------------------------------------------------------------------------
#define MAX_TEXTLEN 1024
#define UM_GETTEXT WM_USER + 0x392
//-------------------------------------------------------------------------
//開始鉤
void HookAllTextOut();
//停止鉤子
void UnHookAllTextOut();
//-------------------------------------------------------------------------
//消息回調(diào)函數(shù)
LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam);
//枚舉子窗體回調(diào)函數(shù)
BOOL CALLBACK EnumChildWindowsProc( HWND hWnd, LPARAM lParam );
//-------------------------------------------------------------------------
// hook api
DLLEXPORT BOOL WINAPI NHBitBlt(HDC hdcDest,
int nXDest,
int nYDest,
int nWidth,
int nHeight,
HDC hdcSrc,
int nXSrc,
int nYSrc,
DWORD dwRop);
DLLEXPORT BOOL WINAPI NHTextOutA(HDC hdc,
int nXStart,
int nYStart,
LPCTSTR lpString,
int cbString);
DLLEXPORT BOOL WINAPI NHTextOutW(HDC hdc,
int nXStart,
int nYStart,
LPCWSTR lpString,
int cbString);
DLLEXPORT BOOL WINAPI NHExtTextOutA(HDC hdc,
int X,
int Y,
UINT fuOptions,
CONST RECT *lprc,
LPCTSTR lpString,
UINT cbCount,
CONST INT *lpDx);
DLLEXPORT BOOL WINAPI NHExtTextOutW(HDC hdc,
int X,
int Y,
UINT fuOptions,
CONST RECT *lprc,
LPCWSTR lpString,
UINT cbCount,
CONST INT *lpDx);
//-------------------------------------------------------------------------
#endif // _INC_EXPORTS
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -