-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathVirtualMouse.c
More file actions
56 lines (44 loc) · 1.3 KB
/
VirtualMouse.c
File metadata and controls
56 lines (44 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <windows.h>
#include "wndproc.h"
#include <commctrl.h>
#include "resource.h"
#pragma comment ( lib, "comctl32.lib")
//////////////////////////////////////////////////////////////////////////
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow )
{
static char szAppName[] = "VirtualMouse";
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndProc;
wndclass.hInstance = hInstance;
wndclass.hCursor = LoadCursor( NULL, IDC_ARROW );
wndclass.hIcon = LoadIcon( hInstance, MAKEINTRESOURCE(IDI_ICON_LEFT) );
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hbrBackground = CreateSolidBrush( RGB(236, 233, 216) );
wndclass.lpszClassName = szAppName;
wndclass.lpszMenuName = NULL;
if( !RegisterClass( &wndclass ) )
{
MessageBox( NULL, TEXT("完笥窃廣過払移!"), TEXT("危列"), MB_OK | MB_ICONERROR );
return 0;
}
InitCommonControls();
hwnd = CreateWindow(
szAppName, TEXT("倡亭報炎"),
WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX,
CW_USEDEFAULT, CW_USEDEFAULT,
400, 300,
NULL, NULL, hInstance, NULL
);
ShowWindow( hwnd, iCmdShow );
UpdateWindow( hwnd );
while( GetMessage( &msg, NULL, 0, 0 ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
return msg.wParam;
}