Click here to Skip to main content
15,916,463 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Web Control Pin
Richard MacCutchan12-Oct-09 22:01
mveRichard MacCutchan12-Oct-09 22:01 
GeneralRe: C++ Web Control Pin
kilt13-Oct-09 2:27
kilt13-Oct-09 2:27 
GeneralRe: C++ Web Control Pin
Richard MacCutchan13-Oct-09 2:58
mveRichard MacCutchan13-Oct-09 2:58 
QuestionGreek letter in a dialog Pin
Gagnon Claude11-Oct-09 6:06
Gagnon Claude11-Oct-09 6:06 
AnswerRe: Greek letter in a dialog Pin
Richard MacCutchan11-Oct-09 7:27
mveRichard MacCutchan11-Oct-09 7:27 
AnswerRe: Greek letter in a dialog Pin
CPallini11-Oct-09 11:34
mveCPallini11-Oct-09 11:34 
QuestionClosing CDialog when it looses the focus Pin
msn9211-Oct-09 5:08
msn9211-Oct-09 5:08 
AnswerRe: Closing CDialog when it looses the focus Pin
Iain Clarke, Warrior Programmer11-Oct-09 5:24
Iain Clarke, Warrior Programmer11-Oct-09 5:24 
GeneralRe: Closing CDialog when it looses the focus Pin
msn9211-Oct-09 7:35
msn9211-Oct-09 7:35 
GeneralRe: Closing CDialog when it looses the focus Pin
Joe Woodbury11-Oct-09 7:57
professionalJoe Woodbury11-Oct-09 7:57 
GeneralRe: Closing CDialog when it looses the focus Pin
msn9211-Oct-09 10:35
msn9211-Oct-09 10:35 
GeneralRe: Closing CDialog when it looses the focus Pin
Joe Woodbury11-Oct-09 10:46
professionalJoe Woodbury11-Oct-09 10:46 
GeneralRe: Closing CDialog when it looses the focus Pin
David Crow11-Oct-09 16:50
David Crow11-Oct-09 16:50 
GeneralRe: Closing CDialog when it looses the focus Pin
Iain Clarke, Warrior Programmer11-Oct-09 20:37
Iain Clarke, Warrior Programmer11-Oct-09 20:37 
GeneralRe: Closing CDialog when it looses the focus Pin
msn9213-Oct-09 15:18
msn9213-Oct-09 15:18 
GeneralRe: Closing CDialog when it looses the focus Pin
Iain Clarke, Warrior Programmer13-Oct-09 21:28
Iain Clarke, Warrior Programmer13-Oct-09 21:28 
Firstly - nicely done on presenting what you did, with credits to the helpers. And helpful to others!

As for communicating back...

You have many approaches. You could have a structure of information somewhere in the main program, and pass COptionsDlg a pointer to it. Then, if the dialog is closed "properly" (ie, OK button), fill in the structure with the DoDataExchange / UpdateDate method.

I would also post a message to your parent window saying "I'm goooone!". That way the parent can tidy up any pointers to your option dialog, and enable any Tools | Options menu. It's a good idea to post on success AND failure, and let the parent window decide whether it cares. You could put IDOK / IDCANCEL in the WPARAM of the PostMessage.

You could also drop David's delete this bit, keep the options in the dialog, and then delete it all in the PostMessage handler in your main program.

How you do it really depends on the details of your software, but I hope that's given you the idea.

Iain

I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]

GeneralRe: Closing CDialog when it looses the focus Pin
msn9217-Oct-09 7:29
msn9217-Oct-09 7:29 
GeneralRe: Closing CDialog when it looses the focus Pin
Iain Clarke, Warrior Programmer17-Oct-09 7:48
Iain Clarke, Warrior Programmer17-Oct-09 7:48 
GeneralRe: Closing CDialog when it looses the focus Pin
msn9231-Oct-09 19:41
msn9231-Oct-09 19:41 
Questioncreating limited objects Pin
p_196011-Oct-09 3:15
p_196011-Oct-09 3:15 
AnswerRe: creating limited objects Pin
wangningyu11-Oct-09 4:54
wangningyu11-Oct-09 4:54 
GeneralRe: creating limited objects Pin
CPallini11-Oct-09 10:59
mveCPallini11-Oct-09 10:59 
RantRe: creating limited objects PinPopular
Iain Clarke, Warrior Programmer11-Oct-09 5:27
Iain Clarke, Warrior Programmer11-Oct-09 5:27 
AnswerRe: creating limited objects Pin
Rajesh R Subramanian11-Oct-09 5:42
professionalRajesh R Subramanian11-Oct-09 5:42 
GeneralRe: creating limited objects Pin
CPallini11-Oct-09 11:01
mveCPallini11-Oct-09 11:01 

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.