handwriter.h

来自「三星2440下的手写程序.没有字库,因有版权问题.」· C头文件 代码 · 共 59 行

H
59
字号
#pragma once
#include "resource.h"

#include <vector>

std::vector<POINT> points;

#define MAX_LOADSTRING 100
#define OUTLEN 255

#define dim(x) (sizeof(x) / sizeof(x[0])) 

struct decodeUINT {                             // Structure associates
    UINT Code;                                  // messages 
                                                // with a function. 
    LRESULT (*Fxn)(HWND, UINT, WPARAM, LPARAM);
}; 

// 全局变量:
HINSTANCE			g_hInst;			// 当前实例
HWND				g_hWndCommandBar;	// 命令栏句柄

bool bDrawing;
bool bFinish;

// 此代码模块中包含的函数的前向声明:
ATOM				MyRegisterClass(HINSTANCE, LPTSTR);
BOOL				InitInstance(HINSTANCE, int);
LRESULT CALLBACK	WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK	About(HWND, UINT, WPARAM, LPARAM);

LRESULT				DoCreate(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);

LRESULT				DoCommand(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);

LRESULT				DoPaint(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);

LRESULT				DoLButtonDown(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);

LRESULT				DoLButtonUp(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);

LRESULT				DoMouseMove(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);

LRESULT				DoDestroy(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);

LRESULT				DoTimer(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);

void				Gb2312ToUnicode(wchar_t* pOut,char *gbBuffer);

const struct decodeUINT MainMessages[] = {
	WM_CREATE,DoCreate,
	WM_COMMAND,DoCommand,
    WM_PAINT, DoPaint,
	WM_LBUTTONDOWN,DoLButtonDown,
	WM_LBUTTONUP,DoLButtonUp,
	WM_MOUSEMOVE,DoMouseMove,
    WM_DESTROY, DoDestroy,
	WM_TIMER,DoTimer
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?