CodePudding user response:
The graphical user interface can learn c + + Builder, architecture is advanced, it is easy to entryNewer versions of the c + + Builder - RAD Studio XE3 above and add support for iOS and Android toolkit, lets developers write Delphi/c + + application in Windows at the same time, the OS X, iOS and Android platforms, now the latest version is 10.1 RAD Studio,
Fyi:
For beginners to learn c + + Builder first program (simulated chat rooms), classic!
http://blog.163.com/tab_98/blog/static/11924097201693033057497/
C + + Builder drawing sample (analog clock)
http://blog.163.com/tab_98/blog/static/11924097201611324819376/
From C to C + + Builder menu interface management system of the graphical user interface, a simple address book example Demo
http://blog.163.com/tab_98/blog/static/1192409720158673337998/
Written by c + + Builder "ZEC blackjack game of CARDS"
http://blog.163.com/tab_98/blog/static/119240972016115113039304/
Written by c + + Builder "ZEC zombie version whack-a-mole"
http://blog.163.com/tab_98/blog/static/11924097201601084117748/
Written by c + + Builder "ZEC tuixiangzi"
http://blog.163.com/tab_98/blog/static/11924097201612011839642/
Book recommendation:
"C + + Builder 6 program design course (second edition)" (such as loyal lu, wen-liang liu/2011-04-01/science press)
"C + + Builder6 programming instance essence solution" (Zhao Mingxian), PDF, is a digital version, a scan version, there is also a complete implementation of tetris game,
"Wonderful" c + + Builder 6 programming Wu Yixian (Taiwan), there are a few simple little game, 10 can read later rewrite, is their mastery of the,
"C + + Builder 5 senior programming examples of fine solution" (written by Liu Bin) are larger practical program,
CodePudding user response:
Array sorting and window it doesn't matter,Fyi:
# 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:
The fifth edition Windows programming