CDHtmlDialog : why can't return key be used? 
Author Message
 CDHtmlDialog : why can't return key be used?

Hi,

In a very simple CDHtmlDialog-based dialog, which also embeds some
external html code (IFRAME), I just can not use the return key in
html-inputs (to submit the form to the remote server), as the return key
seems to be wrapped by the parent (dhtml)dialog class, terminating the
dialog itself (??) instead of submitting the data.

CDHtmlDialog  <<< return key seems to be caught here
     ||
     \/
   Iframe
     ||
     \/
  form data
     ||
     \/
   input  <<< user input is working, except for return key

I tried to wrap WM_KEYxx messages, with no success.

Any idea on how to disable this problematic feature?



Sat, 10 Sep 2005 10:37:37 GMT  
 CDHtmlDialog : why can't return key be used?

Quote:
> In a very simple CDHtmlDialog-based dialog, which also embeds some
> external html code (IFRAME), I just can not use the return key in
> html-inputs

Workaround found:
- override CWebViewDlg::OnOK
- call the COM IHTMLFormElement interface object:
CComPtr<IHTMLFormElement> form;
if (GetElementInterface("form", &form) == S_OK) {
        leftForm->submit();
Quote:
}

..

But this is rather dirty.



Sat, 10 Sep 2005 16:14:33 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Why am I not intercepting Enter key (VK_RETURN)

2. Why I am getting Error C2091: function returns function

3. Don't understand why I am getting the C2236 error

4. Strange quirk with CDHtmlDialog's and compressed .exe's

5. Beginner [Q] Using Canned File Open/Save dialog

6. ending a blocing sockets call (am using MFC's CSocket class)

7. Don't allow return key

8. Return key doesn't work in strange CDialog

9. Using the Return key to change input fields (CEdit)

10. How to encrypt (RSA) using private key and decrypt using public key

11. why my dropdownlist doesn't return right value

12. Why doesn't Pointer Return work properly?

 

 
Powered by phpBB® Forum Software