Click here to Skip to main content
16,005,339 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Questionwhy are WM_CTLCOLORSTATIC and COLOR_BTNFACE not playing along? Pin
alianyn18-Jul-06 3:39
alianyn18-Jul-06 3:39 
QuestionHow to check if the Flash player installed Pin
hell_admin13-Jul-06 20:58
hell_admin13-Jul-06 20:58 
AnswerRe: How to check if the Flash player installed Pin
sudeesh26-Jul-06 2:58
sudeesh26-Jul-06 2:58 
GeneralRe: How to check if the Flash player installed Pin
hell_admin26-Jul-06 3:14
hell_admin26-Jul-06 3:14 
QuestionCompiler error Pin
HarishDixit13-Jul-06 5:04
HarishDixit13-Jul-06 5:04 
AnswerRe: Compiler error Pin
Jörgen Sigvardsson16-Jul-06 21:59
Jörgen Sigvardsson16-Jul-06 21:59 
QuestionIXMLDOMDocument how to use Pin
shivditya13-Jul-06 2:35
shivditya13-Jul-06 2:35 
AnswerRe: IXMLDOMDocument how to use Pin
Steve S13-Jul-06 4:29
Steve S13-Jul-06 4:29 
You should ask in the XML Forum[^], not in here.

However, to save your first post being a copy of this, here's a few things to get you started.

In your stdafx.h file (or whatever you're using as a precompiled header) put

#import <msxml.dll> rename_namespace("MSXML") raw_interfaces_only named_guids

That will give you declarations for the various MS XML interfaces and such.

Secondly, you need to instantiate a document. Here's where it's a little tricky, since you have to know what version of MSXML you want to use.

CComPtr<MSXML::IXMLDOMDocument> spDoc;
HRESULT hr;
CLSID clsid;
if (SUCCEEDED(::CLSIDFromProgID(L"MSXML2.DOMDocument.3.0", &clsid)))
{
hr = ::CoCreateInstance(clsid, NULL, CLSCTX_ALL, MSXML::IID_IXMLDOMDocument, reinterpret_cast<void**>(&spDoc));
if (SUCCEEDED(hr))
{
// Yay, we have a document object!
}
}

Once you have one of those, you can load it

VARIANT_BOOL bLoaded = VARIANT_FALSE;
hr = spDoc->load( _variant_t(sourcefile), &bLoaded);
if (SUCCEEDED(hr) && bLoaded)
{
// Your document is loaded, use MSXML methods to interrogate the DOM document
// and extract your data...
}

MSDN has lots of information on IXMLDOMDocument and the other related interfaces, so dig around in there, or ask questions in the XML forum.

Steve S
Developer for hire
QuestionWhy my ocx could not display in word? Pin
mrlhb12-Jul-06 3:39
mrlhb12-Jul-06 3:39 
AnswerRe: Why my ocx could not display in word? Pin
mrlhb15-Jul-06 16:46
mrlhb15-Jul-06 16:46 
QuestionAsp Pages on differnert resolution Pin
ayazsb12-Jul-06 1:40
ayazsb12-Jul-06 1:40 
AnswerRe: Asp Pages on differnert resolution Pin
Malli_S16-Jul-06 19:42
Malli_S16-Jul-06 19:42 
QuestionVC++ does not consider WTLs presence Pin
shivditya11-Jul-06 1:31
shivditya11-Jul-06 1:31 
AnswerRe: VC++ does not consider WTLs presence Pin
Monty211-Jul-06 2:13
Monty211-Jul-06 2:13 
AnswerRe: VC++ does not consider WTLs presence Pin
Steve Echols11-Jul-06 18:57
Steve Echols11-Jul-06 18:57 
GeneralRe: VC++ does not consider WTLs presence Pin
shivditya11-Jul-06 22:47
shivditya11-Jul-06 22:47 
QuestionThis problem is yet not solved ? Pin
shivditya11-Jul-06 23:50
shivditya11-Jul-06 23:50 
AnswerRe: This problem is yet not solved ? Pin
Steve S12-Jul-06 2:59
Steve S12-Jul-06 2:59 
QuestionRe: This problem is yet not solved ? Pin
shivditya12-Jul-06 19:39
shivditya12-Jul-06 19:39 
AnswerRe: This problem is yet not solved ? Pin
Steve S12-Jul-06 21:47
Steve S12-Jul-06 21:47 
AnswerRe: This problem is yet not solved ? Pin
Jörgen Sigvardsson16-Jul-06 1:45
Jörgen Sigvardsson16-Jul-06 1:45 
QuestionUrgent:memory leak in recursion with CComPtr Pin
rana7410-Jul-06 22:08
rana7410-Jul-06 22:08 
AnswerRe: Urgent:memory leak in recursion with CComPtr Pin
Stephen Hewitt11-Jul-06 1:19
Stephen Hewitt11-Jul-06 1:19 
GeneralRe: Urgent:memory leak in recursion with CComPtr Pin
Monty211-Jul-06 2:15
Monty211-Jul-06 2:15 
GeneralRe: Urgent:memory leak in recursion with CComPtr Pin
Stephen Hewitt11-Jul-06 2:40
Stephen Hewitt11-Jul-06 2:40 

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.