dialog
-
where do i validate the dialogs data? Is it in the views member function? pl give me an idea. Thanks dana
i usually override OnOK in the dialog and do any validation there. if the validation fails, tell the user what happened and then return, don't call CDialog::OnOK. -c
WWJD? JWRTFM.
found on /. -
where do i validate the dialogs data? Is it in the views member function? pl give me an idea. Thanks dana
Validate how ? If you're using DDE, then the data validates itself at the time of entry. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
-
Validate how ? If you're using DDE, then the data validates itself at the time of entry. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
-
it is for validating the string entented in the textbox? to my knowledge, i think we can validate only the max. length of the string in DDX functions? am i correct or not?
Yes. DDX sucks in any case, you should probably follow Chris' advice and validate in OnOK. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
-
i usually override OnOK in the dialog and do any validation there. if the validation fails, tell the user what happened and then return, don't call CDialog::OnOK. -c
WWJD? JWRTFM.
found on /. -
Ok, I can override the OnOk function to do my validation, but how to i make the users data to be transferred to the dialog's member variable? do i have to call the DoDataExchange function??
in OnOK, call UpdateData, first. this will send all the data through the DDX functions and into whatever variables you've attached to the controls. then you can look at the member variables and do your other validation. -c
WWJD? JWRTFM.
found on /.