#include <Windows.h>
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#include <cmath>
#include <vector>
typedef std::pair<POINT, POINT> LINE;
typedef std::vector<std::pair<POINT, POINT> > LINELIST;
HINSTANCE g_hInstance = nullptr;
HWND g_hMainWnd = nullptr;
RECT g_rc;
int g_width;
int g_height;
LINELIST g_linelist;
bool g_leftBtnDown = false;
POINT g_p1;
POINT g_p2;
void InitWindow(HINSTANCE hInstance, int nCmdShow);
void MessageLoop();
void Clean(HDC hdc);
void Draw(HDC hdc);
int Quit();
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
InitWindow(hInstance, nCmdShow);
MessageLoop();
UnregisterClass(L"class1", hInstance
win32api双缓冲的使用例子(画线条)
最新推荐文章于 2025-06-01 09:29:24 发布