Click here to Skip to main content
15,916,379 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to read Triggers of a Database Pin
Vikrant for VC++1-Apr-06 4:18
Vikrant for VC++1-Apr-06 4:18 
GeneralRe: How to read Triggers of a Database Pin
includeh101-Apr-06 6:44
includeh101-Apr-06 6:44 
AnswerRe: How to read Triggers of a Database Pin
crazymubashir2-Apr-06 21:15
crazymubashir2-Apr-06 21:15 
QuestionAfter open a XML File how to print the data of XML File on Active Document Pin
Amit Agarrwal1-Apr-06 1:50
Amit Agarrwal1-Apr-06 1:50 
AnswerRe: After open a XML File how to print the data of XML File on Active Document Pin
Milton Karimbekallil1-Apr-06 2:50
Milton Karimbekallil1-Apr-06 2:50 
GeneralRe: After open a XML File how to print the data of XML File on Active Document Pin
Amit Agarrwal1-Apr-06 2:57
Amit Agarrwal1-Apr-06 2:57 
GeneralRe: After open a XML File how to print the data of XML File on Active Document Pin
Milton Karimbekallil1-Apr-06 4:09
Milton Karimbekallil1-Apr-06 4:09 
GeneralRe: After open a XML File how to print the data of XML File on Active Document Pin
Amit Agarrwal2-Apr-06 20:14
Amit Agarrwal2-Apr-06 20:14 
hi sir,

i'm using following function to open a XML File.it returing a Bool value.i have given a Menu Option to open the XML File.i have decalred into mainfrm.h & mainfrm.cpp for it.so when i run the program & click on the appropriate menu option for open a XML File.it opens.

void CMainFrame::OnLoadxmlLoadxmlfile() //this is function which will called when somebody click on menu option.
{
// TODO: Add your command handler code here
if(OpenXMLFile("E:\WorkingBigBoss\BigBossApp\books.xml"))
{
AfxMessageBox("Hi Love");
}

//ReadXMLFile("E:\WorkingBigBoss\BigBossApp\books.xml");

}
bool CMainFrame::OpenXMLFile(const CComBSTR& bstrFileName)
{

VARIANT_BOOL bFlag;
_variant_t varFilePath;

CoInitialize(NULL);
if (m_pIDomDoc != NULL) //Declare it as member of ur class IXMLDOMDocument* m_pIDomDoc;
{
m_pIDomDoc = NULL;
}

if (m_pIDomDoc==NULL)
{
HRESULT hr = CoCreateInstance(CLSID_DOMDocument , NULL, CLSCTX_INPROC_SERVER , IID_IXMLDOMDocument ,
reinterpret_cast < void **> (&m_pIDomDoc));

if (SUCCEEDED(hr) && m_pIDomDoc!= NULL)
{
OLECHAR *oleFilePath = new OLECHAR[wcslen(bstrFileName) + 1];
wcscpy(oleFilePath, bstrFileName);
varFilePath = oleFilePath;

hr = m_pIDomDoc->load(varFilePath, &bFlag);
//load the file in xmlDoc

bstr = m_pIDomDoc->bstrFileName;
/* if (SUCCEEDED(hr))
{
return true;
}
varFilePath.Clear();
delete []oleFilePath;*/
}
}
return false;
}
above code is running succesfully.

so now u said i have to decalare a _bstr variable in cdocument.and what is xml.i know that i'm little confuse & bothring u.but sir please help u.

so what i want:- just give me the steps with the file name.
& what would be the relation of openXMLfile and ur steps.

thanx


Aavesh
QuestionPermutation algorithm?? Pin
lris20051-Apr-06 1:13
lris20051-Apr-06 1:13 
AnswerRe: Permutation algorithm?? Pin
Waldermort2-Apr-06 5:23
Waldermort2-Apr-06 5:23 
QuestionCLisrctrl Pin
Girish6011-Apr-06 1:04
Girish6011-Apr-06 1:04 
AnswerRe: CLisrctrl Pin
includeh101-Apr-06 6:58
includeh101-Apr-06 6:58 
AnswerRe: CLisrctrl Pin
Dr-Kuulun2-Apr-06 0:35
Dr-Kuulun2-Apr-06 0:35 
GeneralRe: CLisrctrl Pin
Girish6014-Apr-06 21:16
Girish6014-Apr-06 21:16 
Questionproblem in find replace portion of MDI application Pin
cancerion1-Apr-06 0:57
cancerion1-Apr-06 0:57 
QuestionRubber band not clear Pin
yang__lee1-Apr-06 0:50
yang__lee1-Apr-06 0:50 
AnswerRe: Rubber band not clear Pin
Hamid_RT1-Apr-06 1:29
Hamid_RT1-Apr-06 1:29 
QuestionSetting modem properties Pin
Krishnan V1-Apr-06 0:31
Krishnan V1-Apr-06 0:31 
AnswerRe: Setting modem properties Pin
Milton Karimbekallil1-Apr-06 2:44
Milton Karimbekallil1-Apr-06 2:44 
GeneralRe: Setting modem properties Pin
Krishnan V5-Apr-06 19:25
Krishnan V5-Apr-06 19:25 
QuestionFTP Server Pin
Ahuja Ekta1-Apr-06 0:11
Ahuja Ekta1-Apr-06 0:11 
Questionregistry available to any user Pin
RomTibi31-Mar-06 23:43
RomTibi31-Mar-06 23:43 
AnswerRe: registry available to any user Pin
Stephen Hewitt1-Apr-06 0:42
Stephen Hewitt1-Apr-06 0:42 
GeneralRe: registry available to any user Pin
RomTibi1-Apr-06 5:19
RomTibi1-Apr-06 5:19 
GeneralRe: registry available to any user Pin
Michael Dunn1-Apr-06 6:10
sitebuilderMichael Dunn1-Apr-06 6:10 

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.