Click here to Skip to main content
15,912,072 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Rookie Pin
Michael Dunn6-Dec-02 20:22
sitebuilderMichael Dunn6-Dec-02 20:22 
GeneralRe: Rookie Pin
Christian Graus6-Dec-02 20:23
protectorChristian Graus6-Dec-02 20:23 
GeneralRe: Rookie Pin
Michael Dunn6-Dec-02 20:28
sitebuilderMichael Dunn6-Dec-02 20:28 
GeneralRe: Rookie Pin
Christian Graus6-Dec-02 20:30
protectorChristian Graus6-Dec-02 20:30 
GeneralRe: Rookie Pin
Michael Dunn6-Dec-02 20:34
sitebuilderMichael Dunn6-Dec-02 20:34 
GeneralRe: Rookie Pin
Christian Graus6-Dec-02 20:41
protectorChristian Graus6-Dec-02 20:41 
GeneralRe: Rookie Pin
KaЯl7-Dec-02 1:53
KaЯl7-Dec-02 1:53 
GeneralRe: Rookie Pin
Christian Graus6-Dec-02 20:22
protectorChristian Graus6-Dec-02 20:22 
That's really cool. Way too many people seem to start with Windows programming without learning any C++ first.

If you're using VC6 then you hit CTRL-W to bring up the class wizard, and in the second tab, you can set variables for a class. There are two options, you can create a variable which holds a string or a number, or a control variable. If you use the former, you end up with a CString ( or an int, etc ) that holds your value. You call UpdateData(FALSE); to populate the variable, and UpdateData(TRUE); to put the variables value into the control. I prefer to create a control, which also means you can hide/move/change it, and then to get the value out you do something like this:

CString sEdit;
m_MyEdit.GetWindowText(sEdit);

And SetWindowText puts the value into the control from the CString.



Christian

No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002

C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002

Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
GeneralRe: Rookie Pin
Alvaro Mendez7-Dec-02 9:26
Alvaro Mendez7-Dec-02 9:26 
GeneralRe: Rookie Pin
Christian Graus7-Dec-02 11:23
protectorChristian Graus7-Dec-02 11:23 
GeneralRe: Rookie Pin
PJ Arends7-Dec-02 11:45
professionalPJ Arends7-Dec-02 11:45 
GeneralRe: Rookie Pin
Nitron7-Dec-02 12:37
Nitron7-Dec-02 12:37 
GeneralRe: Rookie Pin
PJ Arends7-Dec-02 12:50
professionalPJ Arends7-Dec-02 12:50 
GeneralRe: Rookie Pin
jhwurmbach8-Dec-02 22:11
jhwurmbach8-Dec-02 22:11 
GeneralIE plugin Pin
xxhimanshu6-Dec-02 19:20
xxhimanshu6-Dec-02 19:20 
GeneralRe: IE plugin Pin
Laurent Michalkovic6-Dec-02 21:52
Laurent Michalkovic6-Dec-02 21:52 
GeneralRe: IE plugin Pin
xxhimanshu6-Dec-02 22:53
xxhimanshu6-Dec-02 22:53 
General#import directive Pin
nebbish6-Dec-02 19:02
nebbish6-Dec-02 19:02 
GeneralRe: #import directive Pin
Michael Dunn6-Dec-02 20:25
sitebuilderMichael Dunn6-Dec-02 20:25 
GeneralCListCtrl: What message to use for an event handler.. Pin
trustno16-Dec-02 17:22
trustno16-Dec-02 17:22 
GeneralRe: CListCtrl: What message to use for an event handler.. Pin
Michael Dunn6-Dec-02 20:32
sitebuilderMichael Dunn6-Dec-02 20:32 
GeneralMoving a single control in on HScroll in a CScrollView class Pin
VanHlebar6-Dec-02 16:10
VanHlebar6-Dec-02 16:10 
Questionhow to read data into an array in visual c++ Pin
KBL6-Dec-02 14:46
KBL6-Dec-02 14:46 
AnswerRe: how to read data into an array in visual c++ Pin
Christian Graus6-Dec-02 14:51
protectorChristian Graus6-Dec-02 14:51 
GeneralRe: how to read data into an array in visual c++ Pin
KBL6-Dec-02 15:16
KBL6-Dec-02 15:16 

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.