Home > Back-end >  Novice for help!!!!! About C a Windows program!
Novice for help!!!!! About C a Windows program!

Time:09-20

# include & lt; Windows. H>
# include & lt; WindowsX. H>
# include "resource1. H"
H # include "library."
Class my_app: public dialog {//my_app inheritance dialog
Public:
My_app LPCWSTR (SRC) : "dialog (SRC) {}
Private:
BOOL OnInitDialog (HWND hDlg, HWND hwndFocus, LPARAM LPARAM,) {
SetWindowText (GetDlgItem (hDlg, IDC_LABEL), L "Hello World");//prints hello world
Return TRUE;
}
Private:
Int do_proc (HWND hDlg, UINT uMsg, WPARAM WPARAM, LPARAM LPARAM) {
The switch (uMsg) {
HANDLE_MSG (hDlg, WM_INITDIALOG OnInitDialog);
}
Return the dialog: : do_proc (hDlg, uMsg, wParam, lParam);
}
};

__in_opt int WINAPI WinMain (__in HINSTANCE HINSTANCE, HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd)
{
My_app main_dialog (L "MainDialog");//create the app object
Main_dialog. The open ();//open the dialog
}

CodePudding user response:

Operation error, ask, how to define IDC_LABEL??????

CodePudding user response:

No man or woman?????

CodePudding user response:

You this is encapsulated with third-party libraries?

CodePudding user response:

Graphical user interface 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/

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) (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:

You a look at this code is a WIN32, and should call a dialog resource, in your dialog editor, whether there is a ID for IDC_LABEL control??

CodePudding user response:

Haven't seen ah,,,

CodePudding user response:

Don't call the third party packaging library that was built by myself
  • Related