#include <Windows.h>
#include <tchar.h>
BOOLEAN InitWindowClass(HINSTANCE hInstance, int nCmdShow);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){
MSG msg;
if(!InitWindowClass(hInstance, nCmdShow)){
MessageBox(NULL, L"Failed to Create Windows", L"InFo", NULL);
return 1;
}
while(GetMessage(&msg, NULL, 0, 0)){
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
BOOLEAN InitWindowClass(HINSTANCE hInstance, int nCmdShow){
WNDCLASSEX wcex;
HWND hWnd;
TCHAR szWindowsClass[] = L"窗口示例";
TCHAR szTitle[] = L"映射模式及填充示例图";
wcex.cbClsExtra = 0;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.cbWndExtra = 0;
wcex.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wcex.hInstance = hInstance;
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hIcon &
Windows绘图—六种映射方式
最新推荐文章于 2016-02-12 18:54:38 发布