![]() |
|
#1
|
|||
|
|||
CSplitterWnd and CEditViewI have created an MFC application with a CSplitterWnd containing two panels (Left and Right) with the object of displaying XML code from a file in the right hand panel, and a tree structure of the code in the left hand panel. However, when I attempt to open a file (from an IDR_FILE_OPEN command on a menu bar) I cannot get the file contents to display in the right hand panel. Can anyone suggest what command I can use to do this job for me?
Thankyou in advance for any help! |
|||
|
#2
|
|||
|
|||
|
Quote:
What exactly is the problem? |
|
#3
|
|||
|
|||
|
I don't know what command I can use to display the contents of a file, specified from an open menu, in a panel of the splitter window. i.e. a normal CEditView window would use something like:
CPP / C++ / C Code:
Hope this is more helpful. Thanks in advance for any ideas. Last edited by LuciWiz : 27-Jan-2005 at 12:38.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|
#4
|
|||
|
|||
|
Have you considered OLE DB?
|
|
#5
|
|||
|
|||
|
Quote:
No I haven't but I'd rather do it the way that I have been doing it. I can't see it being too difficult to do but I'm just not quite sure how to do it. |
|
#6
|
|||
|
|||
|
Quote:
Hi I don't know if I get your questions. But I guess you are having the difficulty getting the content of XML? If that try DHTML. that is to have a CHtmlView object rather than a normal CEditView. Then you can use GetHtmlDocument() and "get" methods to get the particular part you want. |
|
#7
|
|||
|
|||
|
I just want to display the contents of the file in plain text (i.e. the raw XML code itself). I know how to do this without using a splitter window but cannot do it when using the splitter. The problem appears to be telling the right hand window that I want it to display the raw file contents.
|
|
#8
|
|||
|
|||
|
Quote:
You could have: CLeftView *pTreeView = (CLeftView*)mwndSplitter.GetPane(row1,col1); YouAppView* pView = (YourAppView*)m_wndSplitter.GetPane(row2,col2); I think that's all you need to have since you know how to make it work in one window |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The