Home > Back-end >  Ask: visual C interface to write
Ask: visual C interface to write

Time:03-31

School books teaching is the foundation of knowledge, such as how to write visual interface, the baidu did not find the complete tutorial, I use a tool is vs2019, hope everybody to give advice to the point, want to buy the best vs writing visual window materials of books, or a complete teaching video,

CodePudding user response:

Win32 native API calls the Windows system or QT this tripartite interface library

CodePudding user response:

"Visual c + + classic case of game development,"

CodePudding user response:

Minimum Windows API graphics programming example:
 # pragma comment (lib, "user32") 
# pragma comment (lib, "gdi32")
#include
LRESULT a CALLBACK WndProc (HWND HWND, UINT message, WPARAM WPARAM, LPARAM LPARAM) {
PAINTSTRUCT ps;
HDC HDC.
HFONT HFONT ohfont;
The RECT r;
COLORREF oc;

The switch (the message) {
Case WM_CLOSE://Alt + F4 exit
The PostQuitMessage (0);
break;
In case the WM_PAINT:
BeginPaint (hWnd, & amp; Ps);
HDC=ps. HDC;//the device context to the draw in
GetClientRect (hWnd, & amp; R);//Obtain the window 's client rectangle
Hfont=CreateFont (200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "tahoma");
Ohfont=(HFONT) SelectObject (HDC, HFONT);
Oc=SetTextColor (HDC, 0 x00c080ff);
SetBkMode (HDC, TRANSPARENT);
TextOut (HDC, r.l eft + r.r d.light/2-600, r.t op + r. b ottom/2-100, "the shortest drawing program", 12);
SelectObject (HDC, ohfont);
SetTextColor (HDC, oc);
DeleteObject (hfont);
EndPaint (hWnd, & amp; Ps);
break;
Default:
Return DefWindowProc (hWnd, message, wParam, lParam);
}
return 0;
}
Int WINAPI WinMain (HINSTANCE HINSTANCE, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
MSG MSG={0};
WNDCLASS wc={0};
HBRUSH HBRH;
HBRH=CreateSolidBrush (0 x00000000);
Wc. LpfnWndProc=WndProc;
The wc. The hInstance=hInstance;
Wc. HbrBackground=HBRH;
Wc. LpszClassName="minwindowsapp";
Wc. HCursor=LoadCursor (NULL, IDC_ARROW);
If (0==RegisterClass (& amp; Wc)) return 1;

If (NULL==CreateWindow (wc) lpszClassName,
"Minimal Windows Application,"
WS_POPUP | WS_VISIBLE,
0,
0,
GetSystemMetrics (SM_CXSCREEN),
GetSystemMetrics (SM_CYSCREEN),
0,
0,
HInstance,
NULL))
return 2;

While (GetMessage (& amp; MSG, NULL, 0, 0) & gt; 0 {
DispatchMessage (& amp; MSG);
}
DeleteObject (HBRH);
return 0;
}

CodePudding user response:

refer to the second floor 4 teacher zhao response:
"Visual c + + game development classic case explanation"
is vs2019 as a development tool? I just ordinary software interface design, it has?

CodePudding user response:

Recommend a c + + Builder, don't waste your time
Assuming that ignorance=0.0000000000... 0
Then use the API development GUI program=0.0000000000... 1

CodePudding user response:

refer to fifth floor early play big play nuclear war reply:
recommended c + + Builder, don't waste your time
Assuming that ignorance=0.0000000000... 0
Then use the API development GUI program=0.0000000000... 1
bald, I just want to ask, is there any development tools for vs2019 textbooks or video, you say what oh

CodePudding user response:

When you learned to VS2019 as development tool, estimates Microsoft out VS2022,
  • Related