Querry regarding DoModal
-
hi I am my app i am showing a form to a user using using the doModal method. int nRet = myFrm.DoModal(); And OnOk event of this form i am validating all the fields. But the problem is , if the user presses the escape key on this dialog, the form gets closed and in nRet i get value as IDOK , without validating any feilds of the form. Why is it happening so.. and how to avoid it. Vikram Verma
-
hi I am my app i am showing a form to a user using using the doModal method. int nRet = myFrm.DoModal(); And OnOk event of this form i am validating all the fields. But the problem is , if the user presses the escape key on this dialog, the form gets closed and in nRet i get value as IDOK , without validating any feilds of the form. Why is it happening so.. and how to avoid it. Vikram Verma
vikram Verma wrote:
if the user presses the escape key on this dialog, the form gets closed and in nRet i get value as IDOK
How did you check that the return value was IDOK ? It should be IDCANCEL as far as I know.
Cédric Moonen Software developer
Charting control [v1.1] -
vikram Verma wrote:
if the user presses the escape key on this dialog, the form gets closed and in nRet i get value as IDOK
How did you check that the return value was IDOK ? It should be IDCANCEL as far as I know.
Cédric Moonen Software developer
Charting control [v1.1] -
hi I am my app i am showing a form to a user using using the doModal method. int nRet = myFrm.DoModal(); And OnOk event of this form i am validating all the fields. But the problem is , if the user presses the escape key on this dialog, the form gets closed and in nRet i get value as IDOK , without validating any feilds of the form. Why is it happening so.. and how to avoid it. Vikram Verma
vikram Verma wrote:
And OnOk event of this form i am validating all the fields.
Why have an enabled OK button if fields/controls have invalid contents? That's a bit misleading, in my opinion.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
vikram Verma wrote:
And OnOk event of this form i am validating all the fields.
Why have an enabled OK button if fields/controls have invalid contents? That's a bit misleading, in my opinion.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Newbie00 wrote:
How do you know that he has enabled ok button if the fields are filled in improperly??
Because he is validating the controls in response to the OK button being clicked. That means the OK button is enabled.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
David didn't say so... he said that the UI was badly designed if the user were allowed to validate (press ok button) invalid datas... there should be an On-Fly data validity checking to enable/disable Ok button
[VisualCalc][Flags Beginner's Guide] | [Forums Guidelines][My Best Advice]
-
Newbie00 wrote:
[Message Deleted]
message deletion is crime here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
-
Newbie00 wrote:
[Message Deleted]
message deletion is crime here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
ThatsAlok wrote:
message deletion is crime here!
:-D
WhiteSky
-
Newbie00 wrote:
[Message Deleted]
message deletion is crime here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
I've deleted the message because it wasn't worth seeing. I didn't understand David's reply properly ("validating" --> now I know what it really means :]), and I wrote rubbishy post.
ThatsAlok wrote:
message deletion is crime here!
Shall I burn on the balefire....
-
I've deleted the message because it wasn't worth seeing. I didn't understand David's reply properly ("validating" --> now I know what it really means :]), and I wrote rubbishy post.
ThatsAlok wrote:
message deletion is crime here!
Shall I burn on the balefire....
Newbie00 wrote:
hall I burn on the balefire....
he he he
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you