Click here to Skip to main content
15,887,283 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about the access violation error at the malloc sentence Pin
Cedric Moonen16-Apr-08 4:53
Cedric Moonen16-Apr-08 4:53 
QuestionRe: about the access violation error at the malloc sentence Pin
CPallini16-Apr-08 5:10
mveCPallini16-Apr-08 5:10 
GeneralRe: about the access violation error at the malloc sentence Pin
wendyyue16-Apr-08 5:26
wendyyue16-Apr-08 5:26 
GeneralRe: about the access violation error at the malloc sentence Pin
CPallini16-Apr-08 5:35
mveCPallini16-Apr-08 5:35 
GeneralRe: about the access violation error at the malloc sentence Pin
David Crow16-Apr-08 10:24
David Crow16-Apr-08 10:24 
QuestionSSE2 Pin
galois16-Apr-08 4:37
galois16-Apr-08 4:37 
GeneralRe: SSE2 Pin
Randor 16-Apr-08 7:37
professional Randor 16-Apr-08 7:37 
QuestionHow to inject javascript into webbrowser control Pin
Alexander Fedorov16-Apr-08 4:21
Alexander Fedorov16-Apr-08 4:21 
Hello, I have a dialog based MFC application with embedded webbrowser control. I need to load an url and then inject my javascript when page is loaded. I am able to do this by using insertAdjacentHTML function or pasteHTML (with regions) and injecting deferred script. But the problem is when this injected script is trying to do document.write into the page, it seems to erase all content of the document. What could be a problem there? Also, injected script does not work if I inject script only, it is always necessary to add some "garbade" before script, some extra characters. This is my source code:

long rs = m_web01.get_ReadyState();<br />
if (4 == rs)<br />
{<br />
MSHTML::IHTMLDocument2Ptr spDoc2 = m_web01.get_Document();<br />
MSHTML::IHTMLBodyElementPtr spBody = spDoc2->body;<br />
MSHTML::IHTMLElementPtr spBodElem = spBody;<br />
spBodElem->insertAdjacentHTML(_bstr_t("beforeEnd"), _bstr_t(strInjection));<br />
}


Also, there is another problem, sometimes webbrowser just hangs when trying to download a page, for example google finance homepage page will hang it almost for sure. There is an article in KB saying that there is a problem with setting focus if control is embedded into the formview, but I could not find an universal solution, my control embedded into property page, so how do I handle this?
AnswerRe: How to inject javascript into webbrowser control Pin
led mike16-Apr-08 4:29
led mike16-Apr-08 4:29 
GeneralRe: How to inject javascript into webbrowser control Pin
Alexander Fedorov16-Apr-08 4:50
Alexander Fedorov16-Apr-08 4:50 
GeneralRe: How to inject javascript into webbrowser control Pin
led mike16-Apr-08 5:02
led mike16-Apr-08 5:02 
GeneralRe: How to inject javascript into webbrowser control Pin
Alexander Fedorov16-Apr-08 5:11
Alexander Fedorov16-Apr-08 5:11 
GeneralRe: How to inject javascript into webbrowser control Pin
led mike16-Apr-08 5:27
led mike16-Apr-08 5:27 
GeneralUsing .Net function in vc++ [modified] Pin
rp_suman16-Apr-08 3:01
rp_suman16-Apr-08 3:01 
GeneralRe: Using .Net function in vc++ Pin
Iain Clarke, Warrior Programmer16-Apr-08 3:28
Iain Clarke, Warrior Programmer16-Apr-08 3:28 
GeneralProblem: HANDLE when same name in exe and DLL Pin
janadhana16-Apr-08 1:50
janadhana16-Apr-08 1:50 
GeneralRe: Problem: HANDLE when same name in exe and DLL Pin
Iain Clarke, Warrior Programmer16-Apr-08 2:10
Iain Clarke, Warrior Programmer16-Apr-08 2:10 
GeneralRe: Problem: HANDLE when same name in exe and DLL Pin
janadhana16-Apr-08 2:17
janadhana16-Apr-08 2:17 
GeneralRe: Problem: HANDLE when same name in exe and DLL Pin
CPallini16-Apr-08 2:23
mveCPallini16-Apr-08 2:23 
GeneralRe: Problem: HANDLE when same name in exe and DLL Pin
janadhana16-Apr-08 2:27
janadhana16-Apr-08 2:27 
General3D graph printing Pin
danandu16-Apr-08 1:48
danandu16-Apr-08 1:48 
GeneralRe: 3D graph printing Pin
Schehaider_Aymen16-Apr-08 2:06
Schehaider_Aymen16-Apr-08 2:06 
GeneralRe: 3D graph printing Pin
danandu16-Apr-08 23:51
danandu16-Apr-08 23:51 
GeneralCalculating System ON times Pin
nisha0000016-Apr-08 1:18
nisha0000016-Apr-08 1:18 
GeneralRe: Calculating System ON times Pin
David Crow16-Apr-08 3:03
David Crow16-Apr-08 3:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.