Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: UpdateData() Behavior Pin
Stephen Hewitt5-Feb-07 12:38
Stephen Hewitt5-Feb-07 12:38 
GeneralRe: UpdateData() Behavior Pin
Gary R. Wheeler5-Feb-07 12:42
Gary R. Wheeler5-Feb-07 12:42 
GeneralRe: UpdateData() Behavior Pin
Roger Stoltz5-Feb-07 21:57
Roger Stoltz5-Feb-07 21:57 
GeneralRe: UpdateData() Behavior Pin
Mark Salsbery6-Feb-07 8:36
Mark Salsbery6-Feb-07 8:36 
GeneralRe: UpdateData() Behavior Pin
Roger Stoltz6-Feb-07 11:46
Roger Stoltz6-Feb-07 11:46 
GeneralRe: UpdateData() Behavior Pin
Mark Salsbery6-Feb-07 15:55
Mark Salsbery6-Feb-07 15:55 
GeneralRe: UpdateData() Behavior Pin
Gary R. Wheeler6-Feb-07 12:07
Gary R. Wheeler6-Feb-07 12:07 
GeneralRe: UpdateData() Behavior Pin
Roger Stoltz6-Feb-07 12:41
Roger Stoltz6-Feb-07 12:41 
Gary R. Wheeler wrote:
DDV routines only validate on save operations. The first argument to the DDV routines is a pointer to an object of type CDataExchange, which includes the member m_bSaveAndValidate. All of Microsoft's DDV routines check this value prior to issuing an error. This value is TRUE only if you call UpdateData(TRUE), which means you are doing a save operation.


Of course, this is how DDX/DDV works and if you've got the impression that I don't know how DDX/DDV works; I apologize for not being very clear on that. I know very well how it works, I've even stepped through the call chain when I started doing dialogs with MFC about a decade ago. Rose | [Rose]
My point was that, in my opinion, the data should not be saved until the user has confirmed it by clicking the "OK"/"Apply" buttons or similar. The other direction, i.e. copying the data to the controls, is irrelevant since nothing will be validated using DDV.
I'm talking about when to to perform a save operation, not how.

Regarding the "fill-in-the-blanks" form, I agree that DDX/DDV has it's legimite usage.

My initial intention with my post to Makakuin, was to give some perspective to the usage of UpdateData, not to start a religious dispute on whether DDX/DDV is good or evil.
My post was meant to be informative. The OP didn't provide enough information to advise whether DDX/DDV should be used or not, no matter what opinion I might have on the concept.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote

AnswerRe: UpdateData() Behavior Pin
ThatsAlok6-Feb-07 20:00
ThatsAlok6-Feb-07 20:00 
QuestionMake MFC View "read only" while allowing viewing, scrolling etc. Pin
lctrncs5-Feb-07 9:43
lctrncs5-Feb-07 9:43 
AnswerRe: Make MFC View "read only" while allowing viewing, scrolling etc. Pin
Mark Salsbery5-Feb-07 11:37
Mark Salsbery5-Feb-07 11:37 
GeneralRe: Make MFC View "read only" while allowing viewing, scrolling etc. Pin
lctrncs7-Feb-07 4:36
lctrncs7-Feb-07 4:36 
QuestionVS2005 trial: Registered messages issue Pin
Joan M5-Feb-07 9:33
professionalJoan M5-Feb-07 9:33 
AnswerRe: VS2005 trial: Registered messages issue Pin
Michael Dunn5-Feb-07 9:53
sitebuilderMichael Dunn5-Feb-07 9:53 
AnswerRe: VS2005 trial: Registered messages issue Pin
Gary R. Wheeler5-Feb-07 12:19
Gary R. Wheeler5-Feb-07 12:19 
QuestionAdvanced VC++ 6.0 Book/Reference Pin
acerunner3165-Feb-07 9:23
acerunner3165-Feb-07 9:23 
AnswerRe: Advanced VC++ 6.0 Book/Reference Pin
Christian Graus5-Feb-07 9:32
protectorChristian Graus5-Feb-07 9:32 
GeneralRe: Advanced VC++ 6.0 Book/Reference Pin
acerunner3165-Feb-07 9:44
acerunner3165-Feb-07 9:44 
GeneralRe: Advanced VC++ 6.0 Book/Reference Pin
David Crow5-Feb-07 10:03
David Crow5-Feb-07 10:03 
GeneralRe: Advanced VC++ 6.0 Book/Reference Pin
Christian Graus5-Feb-07 10:53
protectorChristian Graus5-Feb-07 10:53 
GeneralRe: Advanced VC++ 6.0 Book/Reference Pin
acerunner3165-Feb-07 11:05
acerunner3165-Feb-07 11:05 
GeneralRe: Advanced VC++ 6.0 Book/Reference Pin
Gary R. Wheeler5-Feb-07 12:46
Gary R. Wheeler5-Feb-07 12:46 
GeneralRe: Advanced VC++ 6.0 Book/Reference Pin
Christian Graus5-Feb-07 13:39
protectorChristian Graus5-Feb-07 13:39 
GeneralRe: Advanced VC++ 6.0 Book/Reference Pin
ensger5-Feb-07 9:46
ensger5-Feb-07 9:46 
GeneralRe: Advanced VC++ 6.0 Book/Reference Pin
Christian Graus5-Feb-07 13:38
protectorChristian Graus5-Feb-07 13:38 

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.