DDX_Text function causes pop-up 
Author Message
 DDX_Text function causes pop-up

I created a dialog box and called the DDX_Text function in
the DoDataExchange function.  The problem is that if I'm
in the dialog box and I hit the backspace key, I get a pop-
up box that tells me to please enter a number.  This is
very annoying.  I have found that this is a result of the
verification that takes place in the DDX_Text function.  
Can I disable this pop-up or disable it for the
backspace?  

Thanks.



Sun, 20 Feb 2005 23:40:27 GMT  
 DDX_Text function causes pop-up

Quote:
> I created a dialog box and called the DDX_Text function in
> the DoDataExchange function.  The problem is that if I'm
> in the dialog box and I hit the backspace key, I get a pop-
> up box that tells me to please enter a number.  This is
> very annoying.  I have found that this is a result of the
> verification that takes place in the DDX_Text function.  
> Can I disable this pop-up or disable it for the
> backspace?  

If I were a gambler, I'd place my money on the possibility that you have
an EN_CHANGE or EN_UPDATE handler that is calling UpdateData.  This is
not a good design.  If you want to retrieve the contents of an edit
control and put them into a local member variable, call GetWindowText.  
Don't ever call UpdateData directly, unless you absolutely need to
retrieve and validate all of your controls at once.  Usually, you can
get by without ever calling it directly (it's called by CDialog::OnOK).


Tue, 22 Feb 2005 12:34:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. pop ups in webbrowser control

2. How do I interfere with system pop-ups

3. Help pop-ups in MFC App

4. Command Processing in Pop-Ups

5. Dialog box pop-ups - SDI vs. MDI apps

6. about DDX_Text

7. DDX_Text doesn't handle Unicode?

8. Replacing the DDX_Text error message

9. DDX_Text vs. DDX_FieldText

10. DDX_Text question

11. Formatting DDX_Text double output

12. Problem with DDX_Text method

 

 
Powered by phpBB® Forum Software