Click here to Skip to main content
15,905,325 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Shared Library o DLL? Pin
Albert Holguin19-Apr-11 7:30
professionalAlbert Holguin19-Apr-11 7:30 
QuestionDeskband (XP) Problem.. Pin
nitin319-Apr-11 5:54
nitin319-Apr-11 5:54 
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 
jhoesche wrote:
All the dialogs and controls should have been initialized before when the program starts up.

Why would you think/assume that? Controls on a dialog do not get created until the parent/dialog gets created (i.e., OnInitDialog()).

jhoesche wrote:
I just want to be able to access those same controls...

You should only do this from within the dialog itself.

jhoesche wrote:
If I add a button to the dialog that has the columns...

A button having columns?

jhoesche wrote:
This would mean that I could put this button and code in each dialog and it would work - but I wanted to have a single point in a popup window that called the copy function for each dialog based on the active dialog. That is why I was trying call call the function from another class. Any help on how I can do this properly would be ppreciated.


Do you have a class derived from CDialog that acts as the base class? If so, you could create a virtual function in that class that each derived class could implement. When called, the internals of that function would simply enumerate all child controls and populate an array of some sort (supplied by the parent) with their values.

[edit]
I just realized that this, if used with a modal dialog, will not work as I initially thought. It's possible that I do not fully understand your requirements, thus you'll need to scrap my suggestion.
[/edit]

"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


modified on Wednesday, April 20, 2011 4:37 PM

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 
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 

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.