GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 25-Jan-2005, 07:38
njp01u njp01u is offline
New Member
 
Join Date: Jan 2005
Posts: 8
njp01u is on a distinguished road
Question

CSplitterWnd and CEditView


I 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  
Old 25-Jan-2005, 14:54
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough
Quote:
I cannot get the file contents to display in the right hand panel

What exactly is the problem?
  #3  
Old 26-Jan-2005, 02:57
njp01u njp01u is offline
New Member
 
Join Date: Jan 2005
Posts: 8
njp01u is on a distinguished road
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:
((App_View*)m_viewList.GetHead())->SerializeRaw(ar);

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  
Old 26-Jan-2005, 10:45
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough
Have you considered OLE DB?
  #5  
Old 26-Jan-2005, 11:38
njp01u njp01u is offline
New Member
 
Join Date: Jan 2005
Posts: 8
njp01u is on a distinguished road
Quote:
Originally Posted by aie0
Have you considered OLE DB?

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  
Old 31-Jan-2005, 08:24
mingcosp mingcosp is offline
New Member
 
Join Date: Jan 2005
Posts: 14
mingcosp will become famous soon enough
Quote:
Originally Posted by njp01u
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.

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  
Old 31-Jan-2005, 11:01
njp01u njp01u is offline
New Member
 
Join Date: Jan 2005
Posts: 8
njp01u is on a distinguished road
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  
Old 31-Jan-2005, 12:05
mingcosp mingcosp is offline
New Member
 
Join Date: Jan 2005
Posts: 14
mingcosp will become famous soon enough
Quote:
Originally Posted by njp01u
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.
Sorry I didn't get your question

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 GIDBlogOnce again, no time for hobbies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:05.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.