Click here to Skip to main content
15,903,012 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionProblems with getting data from a Edit Control [modified] Pin
jhoesche19-Apr-11 4:54
jhoesche19-Apr-11 4:54 
AnswerRe: Problems with getting data from a Edit Control Pin
David Crow19-Apr-11 7:13
David Crow19-Apr-11 7:13 
GeneralRe: Problems with getting data from a Edit Control Pin
jhoesche19-Apr-11 8:49
jhoesche19-Apr-11 8:49 
AnswerRe: Problems with getting data from a Edit Control Pin
Hans Dietrich19-Apr-11 11:37
mentorHans Dietrich19-Apr-11 11:37 
GeneralRe: Problems with getting data from a Edit Control Pin
jhoesche19-Apr-11 12:12
jhoesche19-Apr-11 12:12 
GeneralRe: Problems with getting data from a Edit Control [modified] Pin
David Crow20-Apr-11 3:47
David Crow20-Apr-11 3:47 
GeneralRe: Problems with getting data from a Edit Control Pin
jhoesche20-Apr-11 5:56
jhoesche20-Apr-11 5:56 
GeneralRe: Problems with getting data from a Edit Control Pin
David Crow20-Apr-11 6:54
David Crow20-Apr-11 6:54 
Use ClassWizard (Ctrl+W) to derive a class from CDialog. Then add the following to it:

class CBaseDialog : public CDialog
{
public:
    virtual int ReadControls( CArray *pArray ) {}
};


Now in your other dialogs, derive them from CBaseDialog instead of CDialog. You'll have at least one change in the .H file and several in the .CPP file.

The virtual method means that the derived classes can choose to implement their own version of it or not. In your implementation of it, you'd likely want to enumerate each of the dialog's child controls, and put their values in the array parameter. Check out EnumChildWindows().

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather


GeneralRe: Problems with getting data from a Edit Control Pin
jhoesche20-Apr-11 7:16
jhoesche20-Apr-11 7:16 
GeneralRe: Problems with getting data from a Edit Control Pin
David Crow20-Apr-11 7:26
David Crow20-Apr-11 7:26 
GeneralRe: Problems with getting data from a Edit Control Pin
jhoesche20-Apr-11 10:12
jhoesche20-Apr-11 10:12 
GeneralRe: Problems with getting data from a Edit Control Pin
David Crow20-Apr-11 10:41
David Crow20-Apr-11 10:41 
Questionhow to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
manoharbalu19-Apr-11 2:36
manoharbalu19-Apr-11 2:36 
AnswerRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
Chris Losinger19-Apr-11 2:48
professionalChris Losinger19-Apr-11 2:48 
GeneralRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
manoharbalu19-Apr-11 3:12
manoharbalu19-Apr-11 3:12 
GeneralRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
Chris Losinger19-Apr-11 3:28
professionalChris Losinger19-Apr-11 3:28 
AnswerRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
Hans Dietrich19-Apr-11 3:29
mentorHans Dietrich19-Apr-11 3:29 
AnswerRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
_AnsHUMAN_ 19-Apr-11 2:50
_AnsHUMAN_ 19-Apr-11 2:50 
QuestionRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
David Crow19-Apr-11 7:15
David Crow19-Apr-11 7:15 
AnswerRe: how to initialize a variable whose name is passed as a string with a given value in a function in vc++6.0 Pin
Mattias G21-Apr-11 12:07
Mattias G21-Apr-11 12:07 
QuestionMinimizing Windows Pin
john563219-Apr-11 2:34
john563219-Apr-11 2:34 
AnswerRe: Minimizing Windows Pin
Hans Dietrich19-Apr-11 3:32
mentorHans Dietrich19-Apr-11 3:32 
GeneralRe: Minimizing Windows Pin
nitin319-Apr-11 6:03
nitin319-Apr-11 6:03 
GeneralRe: Minimizing Windows Pin
john563219-Apr-11 19:16
john563219-Apr-11 19:16 
QuestionRe: Minimizing Windows Pin
David Crow19-Apr-11 7:19
David Crow19-Apr-11 7:19 

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.