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

C / C++ / MFC

 
AnswerRe: how display full text in a list control Pin
rocky_pulley11-Feb-05 7:20
rocky_pulley11-Feb-05 7:20 
AnswerRe: how display full text in a list control Pin
Shog911-Feb-05 13:11
sitebuilderShog911-Feb-05 13:11 
GeneralRe: how display full text in a list control Pin
steph00714-Feb-05 3:16
steph00714-Feb-05 3:16 
QuestionHow to get "private bytes" count pogrammaticaly in C++ Win API? Pin
CherezZaboro11-Feb-05 4:52
CherezZaboro11-Feb-05 4:52 
AnswerRe: How to get "private bytes" count pogrammaticaly in C++ Win API? Pin
jjnet22-Oct-09 23:11
jjnet22-Oct-09 23:11 
Generalerror in xml (code included) Pin
cj_rahul11-Feb-05 3:21
cj_rahul11-Feb-05 3:21 
Generalerror in xml creation (code included) Pin
cj_rahul11-Feb-05 3:20
cj_rahul11-Feb-05 3:20 
GeneralRe: error in xml creation (code included) Pin
ThatsAlok11-Feb-05 18:41
ThatsAlok11-Feb-05 18:41 
Hello Rahul!,

here is working code for IXMLDomDocument,i have taken this from MSDN but partly modified to run it on your compiler.Hope,it will work well for you
IXMLDOMDocument *pIXMLDOMDocument=NULL;
  IXMLDOMElement *pIXMLDOMElement=NULL;
  IXMLDOMProcessingInstruction *pIXMLDOMProcessingInstruction=NULL;
  IXMLDOMNode *pIXMLDOMNode = NULL;
  HRESULT hr ;
  BSTR bstrValue ;

  try
  {
     hr=CoCreateInstance(CLSID_DOMDocument,
                          NULL, CLSCTX_SERVER,
                          IID_IXMLDOMDocument,
                          (LPVOID*)(&pIXMLDOMDocument));

     SUCCEEDED(hr) ? 0 : throw hr;

     if(pIXMLDOMDocument)
     {
        hr=pIXMLDOMDocument->createElement(L"Node1", &pIXMLDOMElement);

        if(SUCCEEDED(hr) && pIXMLDOMElement)
        {
           hr=pIXMLDOMElement->put_text(L"test");
           if(SUCCEEDED(hr))
           {
              hr=pIXMLDOMDocument->createProcessingInstruction(L"xml",
L"version='1.0'", &pIXMLDOMProcessingInstruction);

              if(SUCCEEDED(hr) && pIXMLDOMProcessingInstruction)
              {

                  pIXMLDOMDocument->appendChild(pIXMLDOMProcessingInstruction,
                                                 &pIXMLDOMNode);

              pIXMLDOMDocument->putref_documentElement(pIXMLDOMElement);

              hr=pIXMLDOMDocument->get_xml(&bstrValue);

              if(SUCCEEDED(hr))
              {
                  ::MessageBoxW(NULL, bstrValue, L"Loaded Doc", MB_OK);
                  bResult=TRUE;
              }

                 if(pIXMLDOMNode)
                     pIXMLDOMNode->Release();

                 if(pIXMLDOMProcessingInstruction)
                     pIXMLDOMProcessingInstruction->Release();
              }
           }

           if(pIXMLDOMElement)
               pIXMLDOMElement->Release();
        }
        if(pIXMLDOMDocument)
            pIXMLDOMDocument->Release() ;
     }
  }
  catch(...)
  {
     if(pIXMLDOMElement)
         pIXMLDOMElement->Release();

     if(pIXMLDOMDocument)
         pIXMLDOMDocument->Release();

     if(pIXMLDOMNode)
         pIXMLDOMNode->Release();

     if(pIXMLDOMProcessingInstruction)
         pIXMLDOMProcessingInstruction->Release();

  }



Note: Please Post your COM related Query In it Specialized Forum.


"I Think this Will Help"
[Vote One Here,.....]
<h5
 alok gupta="" <br=""> visit me at http://www.thisisalok.tk

GeneralSNTP server Pin
Anonymous11-Feb-05 2:44
Anonymous11-Feb-05 2:44 
GeneralRe: SNTP server Pin
rocky_pulley11-Feb-05 3:24
rocky_pulley11-Feb-05 3:24 
GeneralRe: SNTP server Pin
markkuk11-Feb-05 4:15
markkuk11-Feb-05 4:15 
GeneralDialog box getting COver the entire Screen Pin
Ranjish11-Feb-05 2:26
Ranjish11-Feb-05 2:26 
GeneralRe: Dialog box getting COver the entire Screen Pin
ThatsAlok11-Feb-05 2:50
ThatsAlok11-Feb-05 2:50 
QuestionHow compiler will determine the parent in virtual derivation Pin
Ranjish11-Feb-05 2:18
Ranjish11-Feb-05 2:18 
AnswerRe: How compiler will determine the parent in virtual derivation Pin
Michael Dunn11-Feb-05 5:13
sitebuilderMichael Dunn11-Feb-05 5:13 
GeneralMDI w/o initial window Pin
Temuri11-Feb-05 2:01
Temuri11-Feb-05 2:01 
GeneralRe: MDI w/o initial window Pin
David Crow11-Feb-05 2:54
David Crow11-Feb-05 2:54 
GeneralThanks!! Pin
Temuri11-Feb-05 3:00
Temuri11-Feb-05 3:00 
GeneralPrinting large BMP file Pin
Vinaya11-Feb-05 1:39
Vinaya11-Feb-05 1:39 
GeneralRe: Printing large BMP file Pin
Roger Allen11-Feb-05 5:44
Roger Allen11-Feb-05 5:44 
GeneralRe: Printing large BMP file Pin
Vinaya13-Feb-05 18:01
Vinaya13-Feb-05 18:01 
QuestionVC++7 Char set ???? Pin
racing5711-Feb-05 0:28
racing5711-Feb-05 0:28 
AnswerRe: VC++7 Char set ???? Pin
RChin11-Feb-05 0:52
RChin11-Feb-05 0:52 
GeneralRe: VC++7 Char set ???? Pin
racing5711-Feb-05 1:00
racing5711-Feb-05 1:00 
GeneralRe: VC++7 Char set ???? Pin
RChin11-Feb-05 1:17
RChin11-Feb-05 1:17 

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.