Click here to Skip to main content
15,908,444 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: system() -passing a variable parameter to wget thro cmd Pin
Mark Salsbery10-Feb-08 9:16
Mark Salsbery10-Feb-08 9:16 
GeneralRe: system() -passing a variable parameter to wget thro cmd Pin
David Crow11-Feb-08 3:37
David Crow11-Feb-08 3:37 
GeneralRuntime control creation in VC++ Pin
rp_suman9-Feb-08 6:30
rp_suman9-Feb-08 6:30 
AnswerRe: Runtime control creation in VC++ Pin
Hamed Musavi9-Feb-08 7:30
Hamed Musavi9-Feb-08 7:30 
GeneralRe: Runtime control creation in VC++ Pin
rp_suman9-Feb-08 22:06
rp_suman9-Feb-08 22:06 
QuestionRe: Runtime control creation in VC++ Pin
Mark Salsbery9-Feb-08 8:23
Mark Salsbery9-Feb-08 8:23 
GeneralRe: Runtime control creation in VC++ Pin
rp_suman9-Feb-08 21:58
rp_suman9-Feb-08 21:58 
GeneralRe: Runtime control creation in VC++ Pin
Mark Salsbery10-Feb-08 8:58
Mark Salsbery10-Feb-08 8:58 
Controls are windows, so they are created the same as any
other window, except they have predefined window classes.

In MFC, windows are created in two steps and destroyed in
two steps - one step for the C++ object (an object derived
from CWnd), and one step for the Windows object (the HWND).
//Example:

// add to parent window class
// The CListBox default constructor will construct the C++ object

CListBox m_MyListBox;

...
// Sometime after the parent is created, usually in response to WM_INITDIALOG
//   or WM_CREATE, create the Windows object, which actually creates the control

m_MyListBox.Create(WS_CHILD | WS_VISIBLE | LBS_STANDARD, CRect(10,10,100,40), this, ID_MYLISTBOXID);


My favorite reference for controls is the Control Library in MSDN[^]

The MFC docs have the MFC-specific info for the various control wrapper classes.

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Runtime control creation in VC++ Pin
Hamid_RT10-Feb-08 20:57
Hamid_RT10-Feb-08 20:57 
QuestionC++ to mathlab Pin
ashwiny9-Feb-08 3:11
ashwiny9-Feb-08 3:11 
GeneralRe: C++ to mathlab Pin
carrivick9-Feb-08 5:40
carrivick9-Feb-08 5:40 
GeneralRe: C++ to mathlab Pin
ashwiny9-Feb-08 6:04
ashwiny9-Feb-08 6:04 
AnswerRe: C++ to mathlab Pin
Arris7410-Feb-08 1:28
Arris7410-Feb-08 1:28 
QuestionHow to create a CTime object from three interger values - hr, min and sec Pin
Priya_Sundar8-Feb-08 19:44
Priya_Sundar8-Feb-08 19:44 
GeneralRe: How to create a CTime object from three interger values - hr, min and sec Pin
sudhir.marni8-Feb-08 20:09
sudhir.marni8-Feb-08 20:09 
GeneralRe: How to create a CTime object from three interger values - hr, min and sec Pin
David Crow11-Feb-08 3:38
David Crow11-Feb-08 3:38 
GeneralRe: How to create a CTime object from three interger values - hr, min and sec Pin
Mark Salsbery8-Feb-08 20:16
Mark Salsbery8-Feb-08 20:16 
General[Resolved]: How to create a CTime object from three interger values - hr, min and sec Pin
Priya_Sundar8-Feb-08 21:23
Priya_Sundar8-Feb-08 21:23 
QuestionAbout .cab File Pin
manish.patel8-Feb-08 19:28
manish.patel8-Feb-08 19:28 
GeneralRe: About .cab File Pin
led mike11-Feb-08 11:42
led mike11-Feb-08 11:42 
GeneralNew,delete operator Pin
Anu_Bala8-Feb-08 19:16
Anu_Bala8-Feb-08 19:16 
GeneralRe: New,delete operator Pin
sudhir.marni8-Feb-08 19:45
sudhir.marni8-Feb-08 19:45 
GeneralRe: New,delete operator Pin
Anu_Bala8-Feb-08 19:52
Anu_Bala8-Feb-08 19:52 
GeneralRe: New,delete operator Pin
sudhir.marni8-Feb-08 20:06
sudhir.marni8-Feb-08 20:06 
QuestionHow to download File from web Pin
manish.patel8-Feb-08 17:18
manish.patel8-Feb-08 17:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.