Home > Software engineering >  Vc for entry
Vc for entry

Time:09-26

I want to learn vc, but didn't want to learn MFC, want to learn the SDK programming, is a great god to do, please tell,

CodePudding user response:

SDK pure API way to write a GUI program is outdated, efficiency is too low, it is ok to understand the principle, main is message mechanism,
-- -- -- -- -- -- -- -- -- --

A graphical user interface (GUI) programming can learn c + + Builder, advanced architecture (and c # drag controls), introduction to more easily,

Newer 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.2 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/

Book recommendation:
"C + + Builder 6 program design course (second edition)" (such as loyal lu, wen-liang liu/2011-04-01/science press) (dangdang)
"C + + Builder 6 programming examples of fine 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:

"Windows programming" fifth edition

Seems to be published in 1998

CodePudding user response:

I think Windows SDK program design methods in 16-bit Windows 3.1 has been mature, Win95 become a 32-bit API, 2000, XP API has increased,

CodePudding user response:

Old 16-bit Windows programs, such as a few small game, can also run on 32-bit Windows 7, because the SDK program is compatible, essentially because the API is compatible,

CodePudding user response:

If the C/C + + based pass, what do you want to go to school, if you are a C/C + + is still in the introduction, the standard C and C + + first learn it well

CodePudding user response:

From the basic introductory first, a little bit, the basis of C and C + + first, student id, again to want to other, maybe you're interested in

CodePudding user response:

Is a little bigger pure Windows SDK programming, the program can write dead you, a little submerged in endless window procedure function code,

CodePudding user response:

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;
}
  • Related