wnd2.cpp

来自「This programm is proxy server for ragnar」· C++ 代码 · 共 34 行

CPP
34
字号
#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 + =
减小字号Ctrl + -
显示快捷键?