Click here to Skip to main content
15,896,063 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DoDataExchange doesn't like pointers ? Pin
David Crow18-Apr-08 3:24
David Crow18-Apr-08 3:24 
GeneralRe: DoDataExchange doesn't like pointers ? Pin
cagespear18-Apr-08 18:26
cagespear18-Apr-08 18:26 
AnswerRe: DoDataExchange doesn't like pointers ? Pin
Hamid_RT17-Apr-08 6:44
Hamid_RT17-Apr-08 6:44 
QuestionHow to run another object from another project Pin
kanekcwu16-Apr-08 5:15
kanekcwu16-Apr-08 5:15 
AnswerRe: How to run another object from another project Pin
CPallini16-Apr-08 5:42
mveCPallini16-Apr-08 5:42 
GeneralRe: How to run another object from another project Pin
kanekcwu16-Apr-08 15:33
kanekcwu16-Apr-08 15:33 
GeneralRe: How to run another object from another project Pin
Hamid_RT17-Apr-08 6:43
Hamid_RT17-Apr-08 6:43 
GeneralRe: How to run another object from another project Pin
David Crow18-Apr-08 3:26
David Crow18-Apr-08 3:26 
AnswerRe: How to run another object from another project Pin
Nathan Holt at EMOM16-Apr-08 10:30
Nathan Holt at EMOM16-Apr-08 10:30 
GeneralRe: How to run another object from another project Pin
kanekcwu16-Apr-08 13:42
kanekcwu16-Apr-08 13:42 
GeneralRe: How to run another object from another project Pin
Hamid_RT17-Apr-08 6:43
Hamid_RT17-Apr-08 6:43 
GeneralRe: How to run another object from another project Pin
kanekcwu17-Apr-08 14:15
kanekcwu17-Apr-08 14:15 
GeneralRe: How to run another object from another project Pin
Hamid_RT17-Apr-08 19:21
Hamid_RT17-Apr-08 19:21 
GeneralRe: How to run another object from another project Pin
kanekcwu16-Apr-08 13:56
kanekcwu16-Apr-08 13:56 
GeneralRe: How to run another object from another project Pin
Nathan Holt at EMOM16-Apr-08 15:55
Nathan Holt at EMOM16-Apr-08 15:55 
Generalabout the access violation error at the malloc sentence Pin
wendyyue16-Apr-08 4:38
wendyyue16-Apr-08 4:38 
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 

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.