I have an MFC CDialog with an IWebBrowser2 in it. I get to a page that has a HTML text area, I can input text but backspace doesn't erase it.
When an ATL ActiveX control that subclasses an edit control is hosted in Internet Explorer, pressing the BACKSPACE key when focus is set to the Edit control causes Internet Explorer to navigate to the previous Web page. If there are no Web pages previous to the one with the control, the BACKSPACE key functions as normal.
When the user clicks on the subclassed control, the control is not UI Activated. This means that any accelerator keys are processed by the Internet Explorer frame. The control is never given a change to process the BACKSPACE accelerator key.
refer: http://support.microsoft.com/kb/190044
Related
I’m trying to develop a macro to adjust invoices with iMacros. When I hit the Adjustment button. I get a Web Page Dialog box and am able to tab, enter and search the first few fields. When I get the results back, I only get 1 line; which I expect. So far so good.
The reesults appears in a "new" section of the Web Dialog Box. The issue I’m having is that I need to check a checkbox on thee only line in the results (2nd section) and haven’t been able to do it so far.
I can't record anything when the Web Dialog Box is open. If I try and record before hitting the Adjust button, iMacros records hitting the button. Then I get the Dialog Manager box; which I can use to tab, key and then Enter. Then I check the checkbox and select another value from a drop down. I stop recording and nothing has been recorded.
Any suggestions on what is going on? It's making me crazy.
I'm using iMacros 12
I embedded a web browser in MFC dialog by using IWebBrowser2 class.
Every time when the dialog is opened, this browser will display a pdf.
However, when I right click on this pdf, it will have the context menu. I don't want the web browser has the context menu, is there any way for me to disable it?
I tried to edit pdf content, but seems like there is not way to disable the right click by editing the pdf. By checking the interface of IWebBrowser2 and its parent class, I didn't seen any API like OnRightClickButton etc.
I use PreTranslateMessage in the dialog, but it cannot be triggered when I right click on the web browser
I am trying to create a file browse dialog in my windows project. When user was trying to save the file, he can save the file on local or on his cloud account.
For example, when user click save, by using CFileDialog, we can open a file dialog like:
When user wants to save his file to his cloud account, he can click the button which beside "New folder" on the top of this dialog, then this dialog will display the folder organization on the cloud account:
So I want to ask that is this kind of dialog possible in MFC ? I was searching it for several hours, but I think none of SHBrowseForFolder or CFileDialog can satisfy it.
I need to key component:
1, we can add customized button on the top, like the "cloud" button.
2, the content layout or style in the middle can be customized.
Is this kind of UI possible in MFC ?
I'm having trouble hooking event messages sent when a user left/right clicks on the app's tackbar tab. I have tried implementing OnNcLButtonDown and the like but no events are ever triggered when I click on the app's tab. Is there a possible COM solutions?
There is an undocumented windows message: code 0x0313 that is send when a user right clicks on the app's taskbar button. Dunno whether its stable to hook though.
I have an MFC application that has a webcontrol. When clickable links are clicked, it opens using IE, not the default browser.
Questions :
Is there a way to force it to open using the default browser?
If not, how do I capture the Link Click event so I could just manipulate the click event later?
Thanks...
No, not as far as I know.
Check out the articles on http://ehsanakhgari.org/article/visual-c/webbrowser-goodies . It has a number of articles that show how to set up an event sink using IDocHostUIHandler etc. to handle events like clicking of links. I'm not sure which interface to implement, it's been years since I last did this. Then, you use ShellExecute() with a url as the third parameter to open a url with the default browser.
You can capture click events by using "HRESULT STDMETHODCALLTYPE Invoke" see MSDN for more details.
And here's a great example that shows how to open your URL using the default browser in the same window, or opening a new window > http://www.codeproject.com/KB/IP/urlnewwindow.aspx