html dialog
-
hello, i have made a dialog with HTML and my question how to prevent if u press enter that the app closes itself. HRESULT Cmfc2htmlDlg::OnButtonOK(IHTMLElement* /*pElement*/) { OnOK(); return S_OK; } HRESULT Cmfc2htmlDlg::OnButtonCancel(IHTMLElement* /*pElement*/) { OnCancel(); return S_OK; } what do i need to do, so it doesn't close if u press the enter bottun on your keyboard. kind regards, marco
-
hello, i have made a dialog with HTML and my question how to prevent if u press enter that the app closes itself. HRESULT Cmfc2htmlDlg::OnButtonOK(IHTMLElement* /*pElement*/) { OnOK(); return S_OK; } HRESULT Cmfc2htmlDlg::OnButtonCancel(IHTMLElement* /*pElement*/) { OnCancel(); return S_OK; } what do i need to do, so it doesn't close if u press the enter bottun on your keyboard. kind regards, marco
See the FAQ: 7.4 How do I prevent a dialog from closing when the user presses Enter or Esc?[^] -- I'm Michael Dunn and I approve this post. Vote Trogdor in oh-four!
-
See the FAQ: 7.4 How do I prevent a dialog from closing when the user presses Enter or Esc?[^] -- I'm Michael Dunn and I approve this post. Vote Trogdor in oh-four!
thnx, normaly i find anything on google, but i was lazy and i tried somany things thank u kind regards, marco Bad = knowing 2 much
-
hello, i have made a dialog with HTML and my question how to prevent if u press enter that the app closes itself. HRESULT Cmfc2htmlDlg::OnButtonOK(IHTMLElement* /*pElement*/) { OnOK(); return S_OK; } HRESULT Cmfc2htmlDlg::OnButtonCancel(IHTMLElement* /*pElement*/) { OnCancel(); return S_OK; } what do i need to do, so it doesn't close if u press the enter bottun on your keyboard. kind regards, marco
you can do this with many ways as follows:- 1- Yourclass::OnOk() { // make it empty } 2- use SetwindowHookEx function to capture Keyboard keys and u can compare the wpararm parameter in your callback function if it =13 then Enter key has been pressed and you can do any thing you need. after this if broblem is found contact me on faroq_tam2004@yahoo to send to you some source code faroq from yemen thammar working in thammar universty and my intersted about network and security im programmer from 6 years ago and ihave my B.C from this universty
-
you can do this with many ways as follows:- 1- Yourclass::OnOk() { // make it empty } 2- use SetwindowHookEx function to capture Keyboard keys and u can compare the wpararm parameter in your callback function if it =13 then Enter key has been pressed and you can do any thing you need. after this if broblem is found contact me on faroq_tam2004@yahoo to send to you some source code faroq from yemen thammar working in thammar universty and my intersted about network and security im programmer from 6 years ago and ihave my B.C from this universty
faroqtam wrote: use SetwindowHookEx function to capture Keyboard keys You must be kidding. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer