📄 wnd2.cpp
字号:
#include "../win_and_sock.h"
#include <stdio.h>
#include "../data.h"
// forward declaration
LRESULT CALLBACK Wnd2Proc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
ATOM Wnd2RegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;
COLORREF bk_color = RGB(0,0,0);
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)Wnd2Proc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = sizeof(LONG);
wcex.hInstance = hInstance;
wcex.lpszClassName = "Wnd2";
wcex.lpszMenuName = NULL;
wcex.hIcon = NULL;
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = CreateSolidBrush(bk_color);
wcex.hIconSm = NULL;
return RegisterClassEx(&wcex);
}
void wnd2_On_WM_Size(HWND hWnd, WPARAM wParam, LPARAM lParam)
{
RECT clirect;
GetClientRect(hWnd, &clirect);
// 逾咫梓桠噱
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -