Ultra Newbi SpQrgsmaal

Tags:    c++ delphi

User
Bruger #509 @ 05.11.01 06:35

Jeg sidder med et stykke kode, hvor jeg skal opdatere en dialog.
Jeg skriver min kode under>

BOOL ProgramNavn::OnInitDialog()
{
ProgramNavn::OnInitDialog();

//FQlgende skulle gerne opdatere min dialog.
UpdateData(FALSE);

}

Det jeg ikke fatter er hvorfor UpdateData(FALSE); ikke hedder UpdateData(TRUE); ???
Det ville da virke mere logisk.

PS> det er forbudt at slaa mig.. :)



1 svar postet i denne tråd vises herunder
1 indlæg har modtaget i alt 2 karma
Sorter efter stemmer Sorter efter dato
User
Bruger #291 @ 06.11.01 15:16
Citat fra bogen "Visual C++ 6.0 Bible" side 324

BOOL UpdateData( BOOL bSaveAndValidate );

"If the value of bSaveAndValidate is TRUE (the default is true if nothing is passed), then the DDX value member variables associated with the controls are updated with the text that is in the controls on the dialog. Therefore, if the edit control in the preceding example had a value of "Test" and UpdateData(TRUE) was called, then the m_strMyEdit would also contain the value "Test". However, if the application needed to update the control with a different value, it would set the m_strMyEdit member variable to the desired value and call UpdateData(FALSE). This would update the control with the value of the m_strMyEdit member variable."





t