#include "stdafx.h"
#include "resource.h"
#include <stdio.h>
#include "QQ美女找茬外挂源码.h"
#define ID_TIMER 1
#define MAX_LOADSTRING 100
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
变量,对象
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
POINT left
1
,
right
1
;
int height
1
,
width
1
;
int cxSize
,
cySize;
HDC hdcMem;
HBITMAP hBitmap;
POINT pt;
TCHAR szString[]
=
TEXT
(
"大家好!!!, 我是Tortoiser -_- ~~~"
)
;
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
声明函数
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
BOOL CALLBACK DlgProc
(
HWND hDlg
,
UINT
message
,
WPARAM wParam
,
LPARAM lParam
)
;
BOOL CALLBACK AboutDlgProc
(
HWND hDlg
,
UINT
message
,
WPARAM wParam
,
LPARAM lParam
)
;
void CALLBACK TimerProc
(
HWND hwnd
,
UINT
message
,
UINT iTimerID
,
DWORD dwTime
)
;
LRESULT CALLBACK WinProc
(
HWND hwnd
,
/
/
handle
to
window
UINT uMsg
,
/
/
message
identifier
WPARAM wParam
,
/
/
first
message
parameter
LPARAM lParam
/
/
second
message
parameter
)
;
int WINAPI WinMain
(
HINSTANCE hInstance
,
/
/
handle
to
current instance
HINSTANCE hPrevInstance
,
/
/
handle
to
previous instance
LPSTR lpCmdLine
,
/
/
command line
int iCmdShow
/
/
show
state
)
{
static TCHAR szAppName[]
=
TEXT
(
"QQ美女找茬外挂"
)
;
WNDCLASS wndclass;
HWND hwnd;
MSG msg;
wndclass.cbClsExtra
=
0
;
/
/
默认
wndclass.cbWndExtra
=
0
;
/
/
默认
wndclass.hbrBackground
=
(
HBRUSH
)
GetStockObject
(
WHITE_BRUSH
)
;
wndclass.hCursor
=
LoadCursor
(
NULL
,
IDC_ARROW
)
;
/
/
默认
wndclass.hIcon
=
LoadIcon
(
hInstance
,
szAppName
)
;
wndclass.hInstance
=
hInstance;
/
/
默认
wndclass.lpfnWndProc
=
WinProc;
wndclass.lpszClassName
=
szAppName;
wndclass.lpszMenuName
=
MAKEINTRESOURCE
(
IDC_QQ
)
;
wndclass.style
=
CS_HREDRAW | CS_VREDRAW;
/
/
默认
if
(
!RegisterClass
(
&
wndclass
)
)
{
MessageBox
(
NULL
,
TEXT
(
"This program requires Windows NT!"
)
,
szAppName
,
MB_ICONERROR
)
;
return
0
;
}
hwnd
=
CreateWindow
(
szAppName
,
szAppName
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
500
,
400
,
NULL
,
LoadMenu
(
hInstance
,
MAKEINTRESOURCE
(
IDC_QQ
)
)
,
hInstance
,
NULL
)
;
ShowWindow
(
hwnd
,
iCmdShow
)
;
UpdateWindow
(
hwnd
)
;
while
(
GetMessage
(
&
msg
,
NULL
,
0
,
0
)
)
{
TranslateMessage
(
&
msg
)
;
DispatchMessage
(
&
msg
)
;
}
return
msg.wParam;
}
LRESULT CALLBACK WinProc
(
HWND hwnd
,
/
/
handle
to
window
UINT uMsg
,
/
/
message
identifier
WPARAM wParam
,
/
/
first
message
parameter
LPARAM lParam
/
/
second
message
parameter
)
{
TCHAR szAppName[]
=
TEXT
(
"QQ美女找茬外挂"
)
;
static HINSTANCE hInstance;
static count
=
0
;
static flag
=
0
;
HDC hdc_me
,
hdc;
/
/
依次为窗口设备描述表,桌面DC
PAINTSTRUCT ps;
HWND desk_hwnd
=
GetDesktopWindow
(
)
;
switch
(
uMsg
)
{
case
WM_CREATE
:
left
1.
x
=
175
;
left
1.
y
=
189
;
right
1.
x
=
683
;
right
1.
y
=
189
;
cxSize
=
GetSystemMetrics
(
SM_CXSCREEN
)
;
cySize
=
GetSystemMetrics
(
SM_CYSCREEN
)
;
width
1
=
cxSize
/
2
;
height
1
=
cySize;
hInstance
=
(
(
LPCREATESTRUCT
)
lParam
)
-
>
hInstance;
RegisterHotKey
(
hwnd
,
100
,
0
,
VK_F
4
)
;
SetWindowPos
(
hwnd
,
HWND_TOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOMOVE|SWP_NOSIZE
)
;
break;
case
WM_COMMAND
:
switch
(
LOWORD
(
wParam
)
)
{
case
IDM_SET
:
DialogBox
(
hInstance
,
(
LPCTSTR
)
IDD_DIALOG
1
,
hwnd
,
(
DLGPROC
)
DlgProc
)
;
/
/
if
(
DialogBox
(
hInstance
,
TEXT
(
"SCR_COPY"
)
,
hwnd
,
DlgProc
)
)
/
/
InvalidateRect
(
hwnd
,
NULL
,
TRUE
)
;
return
0
;
case
IDM_CUT
:
MoveWindow
(
hwnd
,
cxSize
/
2
,
0
,
width
1
-
left
1.
x
-1
,
height
1
-125
,
TRUE
)
;
/
/
窗口移到右边
Sleep
(
200
)
;
/
/
稍等一下
hdc_me
=
GetDC
(
hwnd
)
;
hdcMem
=
CreateCompatibleDC
(
hdc_me
)
;
/
/
内存设备描述表
,
该函数创建一个与指定设备兼容的内存设备上下文环境(DC)。
/
/
如果成功,则返回内存设备上下文环境的句柄;如果失败,则返回值为NULL。
if
(
hBitmap
)
{
DeleteObject
(
hBitmap
)
;
hBitmap
=
NULL;
}
hBitmap
=
CreateCompatibleBitmap
(
hdc_me
,
width
1
-1
,
height
1
)
;
/
/
该函数创建与指定的设备环境相关的设备兼容的位图。
SelectObject
(
hdcMem
,
hBitmap
)
;
/
/
该函数选择一对象到指定的设备上下文环境中,该新对象替换先前的相同类型的对象。
hdc
=
GetDCEx
(
desk_hwnd
,
0
,
DCX_LOCKWINDOWUPDATE
)
;
/
/
该函数检索指定窗口客户区域或整个屏幕的显示设备上下文环境的句柄
pt
=
left
1
;
ScreenToClient
(
hwnd
,
&
pt
)
;
BitBlt
(
hdcMem
,
0
,
0
,
width
1
-1
,
height
1
,
hdc
,
left
1.
x
,
left
1.
y
,
SRCCOPY
)
;
/
/
桌面左边图像放入内存
MoveWindow
(
hwnd
,
left
1.
x
,
0
,
width
1
-
left
1.
x
-1
,
height
1
-125
,
TRUE
)
;
/
/
窗口移到左边
Sleep
(
200
)
;
/
/
右边图像放入内存并进行异或操作
BitBlt
(
hdcMem
,
0
,
0
,
width
1
-
left
1.
x
,
height
1
-125
,
hdc
,
right
1.
x
+
1
,
right
1.
y
,
SRCINVERT
)
;
/
/
这句就是关键的一句算法,求异或操作
if
(
flag
)
KillTimer
(
hwnd
,
ID_TIMER
)
;
flag
=
1
;
SetTimer
(
hwnd
,
ID_TIMER
,
50
,
TimerProc
)
;
ReleaseDC
(
hwnd
,
hdc_me
)
;
ReleaseDC
(
desk_hwnd
,
hdc
)
;
return
0
;
case
IDM_ABOUT
:
DialogBox
(
hInstance
,
(
LPCTSTR
)
IDD_ABOUTBOX
,
hwnd
,
(
DLGPROC
)
AboutDlgProc
)
;
return
0
;
}
break;
case
WM_PAINT
:
hdc
=
BeginPaint
(
hwnd
,
&
ps
)
;
TextOut
(
hdc
,
50
,
50
,
szString
,
lstrlen
(
szString
)
)
;
EndPaint
(
hwnd
,
&
ps
)
;
return
0
;
case
WM_HOTKEY
:
if
(
IsWindowVisible
(
hwnd
)
)
ShowWindow
(
hwnd
,
SW_HIDE
)
;
else
ShowWindow
(
hwnd
,
SW_SHOW
)
;
SendMessage
(
hwnd
,
WM_COMMAND
,
IDM_CUT
,
0
)
;
return
0
;
case
WM_DESTROY
:
PostQuitMessage
(
0
)
;
break;
default
:
return
DefWindowProc
(
hwnd
,
uMsg
,
wParam
,
lParam
)
;
}
return
0
;
}
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
BOOL CALLBACK DlgProc
(
HWND hDlg
,
UINT
message
,
WPARAM wParam
,
LPARAM lParam
)
{
switch
(
message
)
{
case
WM_INITDIALOG
: