Click here to Skip to main content
15,893,161 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Another Error Pin
John M. Drescher10-Mar-06 15:25
John M. Drescher10-Mar-06 15:25 
Questionunexpected end of file while looking for precompiled header directive Pin
romuzu10-Mar-06 14:42
romuzu10-Mar-06 14:42 
AnswerRe: unexpected end of file while looking for precompiled header directive Pin
John M. Drescher10-Mar-06 15:21
John M. Drescher10-Mar-06 15:21 
GeneralRe: unexpected end of file while looking for precompiled header directive Pin
romuzu10-Mar-06 16:04
romuzu10-Mar-06 16:04 
GeneralRe: unexpected end of file while looking for precompiled header directive Pin
John M. Drescher10-Mar-06 16:32
John M. Drescher10-Mar-06 16:32 
AnswerRe: unexpected end of file while looking for precompiled header directive Pin
Intertherain10-Mar-06 16:01
Intertherain10-Mar-06 16:01 
AnswerRe: unexpected end of file while looking for precompiled header directive Pin
Michael Dunn10-Mar-06 16:15
sitebuilderMichael Dunn10-Mar-06 16:15 
QuestionIHTMLDOMNode and IHTMLElement and leading spaces Pin
mcahriman10-Mar-06 10:59
mcahriman10-Mar-06 10:59 
I am writing BHO for now, which dynamically changes the document.

I faced that thing, that if I do next (after the 'documentcomplete' event in browser)



//Code:
CComQIPtr<IHTMLElement> piSpanElement;
hr = pHtmlDocument->createElement(L"span", &piSpanElement);
BSTR innerHtml = L" <u>This is string with leading space"</u>";
//leading space is happily ignored, when I'm inserting that text:

hr = piSpanElement->put_innerHTML(innerHtml);

//Ok-ok, I beleive, it is with the good intentions
//of MSHTML, I will try to insert some text...
//I even do not put a whitespace there...

//Ok, I will try to insert some text...
//(In MSDN it is said, that InsertAdjancedText inserts plain text.

hr = piSpanElement->insertAdjacentText(L"beforeEnd",L"Some text");

//OK, text is in element, but... I needed before content, ok, mistake - I try to correct:

hr = piSpanElement->insertAdjacentText(L"afterBegin",L"!I WANNA SEE THIS TEXT IN ELEMENT before content!");

//It does return S_OK... I do not see that text, WTH!?
//I insert this element simply querying interface and
//substituting the DOM node. After that html element tortures.


May be I'm "stupido", but I cannot convert IHTMLDomNode element to the IHTMLElement. If there is any method - please tell..

then - one more...
we have "this node", reference node, and node to substitute
Substituting node is IHTMLDomNode pointer, former IHTMLDOMTextNode with text " " or any other - the result was same.



CComQIPtr<IHTMLDomNode> resultNode;
VARIANT refNode;

refNode.vt = VT_DISPATCH;
refNode.pdispVal = rNode; //reference node pointer

hr = thisNode->get_parentNode(&pNode); //parent node pointer
//OK, pNode is not null.
hr = pNode->InsertBefore(substitutingNode,refNode,&newNode);
//Why hr is EINVALIDARG???

or just simply - is there any way to insert that eaten leaded space.

Or what I do incorrectly?
AnswerRe: IHTMLDOMNode and IHTMLElement and leading spaces Pin
Gerald Schwab10-Mar-06 12:00
Gerald Schwab10-Mar-06 12:00 
GeneralRe: IHTMLDOMNode and IHTMLElement and leading spaces Pin
mcahriman14-Mar-06 6:56
mcahriman14-Mar-06 6:56 
QuestionExecute program Pin
sam117310-Mar-06 10:39
sam117310-Mar-06 10:39 
AnswerRe: Execute program Pin
georgeraafat10-Mar-06 13:48
georgeraafat10-Mar-06 13:48 
QuestionReadProcessMemory alternative Pin
MaTTEvIL10-Mar-06 10:18
MaTTEvIL10-Mar-06 10:18 
AnswerRe: ReadProcessMemory alternative Pin
Dan McCormick10-Mar-06 11:52
Dan McCormick10-Mar-06 11:52 
Questionclosing MFC dialog app Pin
viperlogic10-Mar-06 8:28
viperlogic10-Mar-06 8:28 
AnswerRe: closing MFC dialog app Pin
Michael Dunn10-Mar-06 8:38
sitebuilderMichael Dunn10-Mar-06 8:38 
GeneralRe: closing MFC dialog app Pin
viperlogic10-Mar-06 8:52
viperlogic10-Mar-06 8:52 
AnswerRe: closing MFC dialog app Pin
MANISH RASTOGI10-Mar-06 17:36
MANISH RASTOGI10-Mar-06 17:36 
QuestionIs it true that if GetActiveView() returns NULL then Our Application Does not Support Doc/view. Pin
CodeVarma10-Mar-06 7:35
CodeVarma10-Mar-06 7:35 
AnswerRe: Is it true that if GetActiveView() returns NULL then Our Application Does not Support Doc/view. Pin
Intertherain10-Mar-06 16:08
Intertherain10-Mar-06 16:08 
QuestionOnInitialUpdate CSplitterWnd Pin
23_44410-Mar-06 7:01
23_44410-Mar-06 7:01 
QuestionRe: OnInitialUpdate CSplitterWnd Pin
David Crow10-Mar-06 8:28
David Crow10-Mar-06 8:28 
AnswerRe: OnInitialUpdate CSplitterWnd Pin
23_44410-Mar-06 8:37
23_44410-Mar-06 8:37 
Questiontxt file Pin
chaitanya2210-Mar-06 6:22
chaitanya2210-Mar-06 6:22 
QuestionRe: txt file Pin
David Crow10-Mar-06 6:34
David Crow10-Mar-06 6:34 

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.