Click here to Skip to main content
15,906,106 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMy silly build error... Pin
bitpusher7-Jan-04 12:33
bitpusher7-Jan-04 12:33 
GeneralRe: My silly build error... Pin
Wes Aday7-Jan-04 12:56
professionalWes Aday7-Jan-04 12:56 
GeneralRe: My silly build error... Pin
John R. Shaw7-Jan-04 13:06
John R. Shaw7-Jan-04 13:06 
GeneralRe: My silly build error... Pin
bitpusher7-Jan-04 13:26
bitpusher7-Jan-04 13:26 
GeneralBest way to display a configuration dialog Pin
shultas7-Jan-04 12:05
shultas7-Jan-04 12:05 
GeneralRe: Best way to display a configuration dialog - some more detail Pin
shultas7-Jan-04 12:11
shultas7-Jan-04 12:11 
GeneralRe: Best way to display a configuration dialog - some more detail Pin
John R. Shaw7-Jan-04 13:29
John R. Shaw7-Jan-04 13:29 
GeneralRe: Best way to display a configuration dialog Pin
Christian Graus7-Jan-04 12:25
protectorChristian Graus7-Jan-04 12:25 
Keep the config data in your main class, as an instance of another class and make it visible to the config dialog, probably by passing it in through the constructor, and visible in the dialog class, so that it can be grabbed back when the dialog is closed. Something like this:

class ConfigData
{
// config stuff here
}

class MainDialog
{
private ConfigData m_configData;

// Read in oninitmethod

private void OnClickShowConfig()
{
MyConfigDialog dlg(m_configData, this);
if(dlg.DoModal() == IDOK)
{
m_configData = dlg.configData;
}
}
}

The config dialog saves the changed data to disk, and has only got a constructor which takes the config as well as the usual parameters with defaults ( parent dialog, etc. That what the this is being passed in for, the parent window )

My MFC is VERY rusty, two years since I used it. But that should be the general idea.


Christian

I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
GeneralExtended MAPI GUID declaration problem Pin
Adam Gritt7-Jan-04 10:55
Adam Gritt7-Jan-04 10:55 
GeneralRe: Extended MAPI GUID declaration problem Pin
nightcoder7-Jan-04 12:02
nightcoder7-Jan-04 12:02 
GeneralRe: Extended MAPI GUID declaration problem Pin
Adam Gritt7-Jan-04 12:10
Adam Gritt7-Jan-04 12:10 
GeneralRe: Extended MAPI GUID declaration problem Pin
Bo Hunter7-Jan-04 12:15
Bo Hunter7-Jan-04 12:15 
GeneralRe: Extended MAPI GUID declaration problem Pin
Adam Gritt7-Jan-04 12:22
Adam Gritt7-Jan-04 12:22 
QuestionHow to draw 2D Shapes with VC++ in DOS ? Pin
Eldalie7-Jan-04 10:32
Eldalie7-Jan-04 10:32 
AnswerRe: How to draw 2D Shapes with VC++ in DOS ? Pin
Jeremy Falcon7-Jan-04 11:34
professionalJeremy Falcon7-Jan-04 11:34 
GeneralRe: How to draw 2D Shapes with VC++ in DOS ? Pin
Eldalie8-Jan-04 8:00
Eldalie8-Jan-04 8:00 
GeneralWhat's up with Rich Edit control Pin
Anonymous7-Jan-04 9:20
Anonymous7-Jan-04 9:20 
GeneralRe: What's up with Rich Edit control Pin
David Crow7-Jan-04 9:46
David Crow7-Jan-04 9:46 
GeneralRe: What's up with Rich Edit control Pin
Anonymous7-Jan-04 9:51
Anonymous7-Jan-04 9:51 
GeneralA CxImage Problem (CXX0030: Error: expression can not be evaluated) Pin
ElizabethC7-Jan-04 8:51
ElizabethC7-Jan-04 8:51 
GeneralRe: A CxImage Problem (CXX0030: Error: expression can not be evaluated) Pin
Monty27-Jan-04 18:16
Monty27-Jan-04 18:16 
GeneralRe: A CxImage Problem (CXX0030: Error: expression can not be evaluated) Pin
ElizabethC8-Jan-04 5:55
ElizabethC8-Jan-04 5:55 
Generalshell programming books Pin
ns7-Jan-04 8:44
ns7-Jan-04 8:44 
GeneralRe: shell programming books Pin
Christian Graus7-Jan-04 10:04
protectorChristian Graus7-Jan-04 10:04 
GeneralRe: shell programming books Pin
Michael Dunn7-Jan-04 10:39
sitebuilderMichael Dunn7-Jan-04 10:39 

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.