Home > Back-end >  Is there a quick method to C
Is there a quick method to C

Time:11-22

Excuse me, ladies and gentlemen,
Have a C language fast study way,
Can match the GUI design is better,
Thank you,

CodePudding user response:

C language tutorial (100 cases with C)
http://download.csdn.net/detail/zhao4zhong1/8830817Visual c + + 2010 Express simplified Chinese http://pan.baidu.com/s/1bnwRVLt
 # pragma comment (lib, "user32") 
# pragma comment (lib, "gdi32")
# include & lt; Windows. H>
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:

GUI, using QT is very convenient

CodePudding user response:

C language with reference to the school term how many class, extracurricular practice and practice arrangement is how much time,
  • Related