CTreeCtrl and CListCtrl problem

I use create a single document struct using MFC(explore 
style).The left of the window is  CLeftView class(which 
inherit CTreeView).The right is CBrowserView which inherit 
CListView.I want to display the content of a directory in 
the right(CListview) when user click the item of the 

In the LeftViw I add method "void CLeftView::OnClickItem
(NMHDR* pNMHDR, LRESULT* pResult)" because I want to know 
which item be clicked by user.
CTreeCtrl& mtree=GetTreeCtrl();
HTREEITEM item=mtree.GetSelectedItem();
data=mtree.GetItemData(item);"    <---get content of a item

I get the CListView pointer in method "CLeftView::OnDraw
(CDC* pDC)":

"POSITION pos=pDoc->GetFirstViewPosition();
		CView* pview=pDoc->GetNextView(pos);
But the problem is the right don't display the content of 
a directory after I click the item.Not echo :(
Is there any wrong in my code?Thanks!

8/1/2003 1:33:05 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 18


Similar Artilces:

HI , CAN ANYONE HELP PLEASE? IT SEEMS QUITE SIMPLE BUT I CAN'T FIND A SOLUTION. I HAVE AN EXCEL FILE WHICH IS UPDATED BY A MACRO EVERY DAY. IT CONTAINS A FEW COLUMNS AND SOME OF THEM ARE FORMATTED AS TEXT. I NEED TO VISUALIZE ALL THE TEXT INTO UPPER CASE. THANKS CINZIA You need to use the UPPER() function. As an example if you had the text "upper" in cell A1 and entered the formula =UPPER(A1) in another cell then the result would display as "UPPER". It may be worth amending the Macro to change the text to uppercase when it runs. >-----Original Message...

a problem
there is an A column has 1500 line and a B column has 1700 line and B column already has A column entries, there just 200 entries are different i want to find 200 diffrent entries. how can i find? Conditional formatting. Select B1:B 1700. Menu Format>Conditional Formatting Change Condition 1 to Formula Is Add a formula of =ISNUMBER(MATCH(B1,$A:$A,0)) Click Format Select the pattern tab Choose a colour OK OK -- HTH Bob Phillips (there's no email, no snail mail, but somewhere should be gmail in my addy) "bakalim" <yok@yok.com> wrote in message news:ueQ7R7CTH...

Queue problem and incoming email directed at crm
I have CRM setup in a test domain fine mostly but asides from replies from SFO to a test account, I dont think all aspects of email routing is fine - but the email router must be least part working in order to be able to store CRM history and email out. I could be wrong on this! I can send emails from CRM to the test account ( not a crm user, but has been setup against a account/contact) and they show in the contact activity history. I can see the replies on the CRM test user in SFO (so they get as far as the account used by CRM), but they do not show in CRM against activity for contact. If ...

Pick List Problem
I posted this a few days ago, but Don't think I explained myself very well. Can anybody help me with this issue. I am trying to select an item from a pick list (Cell A1) to be inserted into another cell and be able to automatically copy the adjacent cell (A2) value to another cell. Example: This is the pick list Cell A1 Cell A2 PAPER HOLDER - LEVEL I (CHROME) $2.80 TOWEL BAR - 24" LEVEL I (CHROME) $2.80 TOWEL BAR - 18" LEVEL I (CHROME) $2.80 Once I choose the item from Cell A1 to fill in another cell location, I want the ad...

problem with automatic forward
hello i have recently upgrade win2000/exch5.5 with Win2003 and Exchange Server 2003 we have another server as SMTP gateway (as smarthost in SMTP connector options) i have created some contacts with external e-mail address for some users to leave messages both in mailbox and forward address Autoatic Forward doesn't work (it works only with internal address) all messages to external address remain in SMTP connector Queue please, have you any idea ?? thank you ...

Removing Item Highlight from CListCtrl
Hi I use MFC VC++ 4.2. I have a CListCtrl, a few CEdit, a Clear Button and a few buttons. Clear button function is to clear all CEdit and also clear the highlight from the selected item. My question is: 1. How to remove the highlight from the selected item? 2. I also need to disable a few buttons if there is no item selected. How to do those things? Thank you very much. >I have a CListCtrl, a few CEdit, a Clear Button and a few buttons. > >Clear button function is to clear all CEdit and also clear the highlight >from the selected item. > >My question is: >1. Ho...

Custom View Problems
I have defined a custom view with some hidden columns and a filter on 1 column. I checked the box to remember hidden columns, rows, and filters. When I display the view, the filter does not seem to have any effect. If I click on the auto filter dropdown menu at the top of the column that has a filter, the correct filter item is highlighted and if I re-select it, the filter works. Is there some other setting I have to enable to get this to work correctly? Also, I have another custom view that unhides the hidden columns and sets the auto filter to "All" in order to get back to the ...

offline sync problem
Yesterday I had a customer's 8 register system lose internet connectivity, so all the registers went off-line. They are using RMS 1.2 SR3 on a SBS Professional 2003 Server with XP SP2 registers. When internet connectivity was restored today, all but one of the registers sync'd. On the register that did not, the last transaction in the batch was at about 7:40pm yesterday. No transactions were recorded after that time. I manually took the register off-line today and could not find any batch or blind-closed batch with any transactions after 7:40pm. I also checked, via MS Acce...

selection in CTreeCtrl
Hello, I have a Tree Control in my application that displays two types of items: type A and type B. I want to implement the following: 1. When user clicks on any item of type A it should be shown as selected and the previously selected item will be deselected - it is actually the default behavior. 2. When user clicks on any item of type B - nothing should happen: the previously selected item remain selected and the clicked item remains deselected. So, actually, I want that the items of type B will never highlighted with a blue band. How can do it? Thanks, Mark. -- Please ...

OE problem
Hi group Win XP Home OE v6 Mozilla (browser) This is what error I have when trying to post in NEWSgroup. Unable to poll for new messages on your HTTP server. Account: 'hotmail', Server: 'http://services.msn.com/svcs/hotmail/httpmail.asp', Protocol: HTTPMail, Server Response: 'Forbidden', Port: 0, Secure(SSL): No, Server Error: 998, Error Number: 0x800CCC33 Tried many things but unable to get past abov. My Net connection good...usinh hotmail via Mozilla. Terry Terry wrote: > Hi group > > Win XP Home > OE v6 > Mozil...

Linker problem compiling new project
I just installed Microsoft Visual Studios .NET 2003 on my Windows XP machine. I opened it up and started a new project. I pick Visual C++ as the language and Win32 Project as the project type. The wizard poped up and I hit finish. I have not done any of my own coding now. I tried to build the project but I got this error: fatal error C1083: Cannot open include file: 'windows.h': No such file or directory It is referenceing the file stdafx.h, which is automatically generated so I thought that it would add the path to the windows.h file automatically. At this time, I have not chan...

Callout problems (not working at all)!
Dear all, We are having a lot of trouble to get a simple test Callout functionality to work. We used the standard microsoft online documentation as an example. We tested on several systems and still no results. We checked to make sure the CLSID of the COM+ object was the same as the one in the subscriber table of the metabase DB. Also changed the name in the subscriber table to match the one of the component as well as the application. When we delete the com-object, no exception is generated. This gives us the feeling that the COM object is never called. What are we doing wrong..... I'...

Probleme bei Adress=?ISO-8859-1?B?/A==?=bertragung zwischen Entourage und Outlook
Hi ich habe folgendes Problem: Ich m�chte gerne meine Adressen zwischen Windows Office Outlook 2004 und Mac Office Entourage 2004 �ber das Internet austauschen. Dabei nutze ich diese Funktion im Men�: als vcard weiterleiten. Das Problem hierbei ist, dass die Notizen in den vcards nicht immer vollst�ndig �bertragen werden! Ich kann auch keine Regel ausmachen, wann dies der Fall ist. Gibt es dazu irgendwelche Einstellungen die ich �bersehen habe? Oder ist dieses Problem bekannt? Gibt es vielleicht andere M�glichkeiten die Adressen mit Notizen (die sind wichtig) zwischen Win und Mac Office �be...

Where Does Outlook Store Info? Computer Problems
Recently the power supply, motherboard, & CPU on my computer died. So I had a new motherboard, power supply, CPU and hard drive installed. The new hard drive is larger and faster than the old one. This required that Windows XP, Microsoft Office, etc, had to be installed. But before any of that was done, the technician took everything off the old hard drive and saved it into a file on the new one. All of the old data files, etc, are supposed to be there. My question, though, is how to find the address book and the saved emails that were on the old computer & put them into Outlook on the...

Two problems, Conditional Formatting and Printing a record
I know these are two seperate problems, but I got them to work and I don't understand how. First: I have 6 fields that are conditionally formatted to be bold/red bg/yellow font if a corrosponding check box is ticked. It is coded: EXPRESSION IS [HP].Value=-1 Where HP is the Checkbox It doesn't work.....sort of. Second: I have a macro that print previews a report based on the ID (primary key) of the currecnt record (to be printed). When the button is clicked, a pop up appears asking for the ID (ID1). This is the macro coding: [ID1]=[Forms]![App 1]![ID1...

A problem about CString
I have a passage of codes like that: /***********************************/ CString filename = fdlg.GetFileName(); CFile file; CString strFile(_T("")); if(file.Open(filename, CFile::modeRead)) { file.Read(strFile.GetBuffer(),file.GetLength()); strFile.ReleaseBuffer(); } /***********************************/ where fdlg is a instance of CFileDialog. It works well in VC++ 6, but failed in VC++ .Net. For example, I have a file like that: /*****/ 123456 234567 /*****/ the length of this file is 14 bytes, but after file.Read() the "strFile" became "123456 2345...

Lotus Connector
I have Office 2003 - Lotus Notes 6.5.2 - XP OS I have the Outlook to Notes Connector installed - the email works without issue - it connects and updates all folders - BUT --- when I slect the Notes calendar it quickly display the items for today and them just hangs up - I get the hour glass that never ends (i've let it run for over an hour) - I have to go to the task manager and end the Outlook process ( it's maxed out at 98%) - This will also happen if I'm not connected to the internet - All other "outlook" calendars work OK Please Help Thanks ...

Plotting Problems #2
Hello, I have a user with Excel 2002 on an NT 4.0 system. He's having problems copying equations into certain cells. Instead of listing the equation, the source location is pasted in (=A5). He has General selected under Format-Cells-Numbers. Any ideas what could be the problem? Thanks in advance, -- Wes Not sure this will help, but I'd try EDIT>COPY while in the cell and then to see what is going on, EDIT>PASTE SPECIAL and see if it defaulting to something other than ALL, FORMULAS or VALUES. I'd also check FILE>PROPERTIES to see if it is read-only. If the s...

ODBC Problems
Never had this much of a problem. I moved to a new server per 878499. Everything went real well. Logged on to GP from the server and everything went fine. Created a system DNS source and tried connecting from workstations with error Connection Failed SQL State '08001 sql error 10060. Please help cause I need everything up and running by Monday morning What version/release of GP and what version of SQL? Frank Hamelly MCP-GP, MCT, MVP East Coast Dynamics www.eastcoast-dynamics.com get your GPtip42today at www.gp2themax.blogspot.com tstrop, Check this article: ht...

Bolding or Hilighting node in a CTreeCtrl
I am looking for a way of of bolding, hilighting, or changing the text color for one specific node in a CTreeCtrl. Is this possible? If so, how? You have use an owner draw tree control. Look in here for one: http://www.codeproject.com/treectrl/#Custom+Tree+Controls This one looks useful http://www.codeproject.com/treectrl/colortreectrl.asp AliR. <mr.porteiro.head@gmail.com> wrote in message news:1141668031.681508.117640@u72g2000cwu.googlegroups.com... > I am looking for a way of of bolding, hilighting, or changing the text > color for one specific node in a CTreeCtrl. Is t...

Root / Child Windows 2003 Exchange 2003 Permission Problem -- What permission is my account missing?
I have a root and child domain (root.company.com and child.company.com). Both root and child servers are running Windows 2003 SP1. I created a user account in the Root domain called "ROOT\SuperAdministrator". This user account a member of: - Administrators - Domain Admins - Domain Users - Enterprise Admins - Exchange Domain Servers - Exchange Enterprise Servers - Schema Admins Exchange 2003 is installed on a Windows 2003 SP1 box in the child domain. Using Exchange System Mananger, we delegated control so that "ROOT\SuperAdministrator" is a "Full Exchange Adminis...

Problem Backing Up PST With Xcopy
Before I upgraded to Office 2003, I used a xcopy batch file from the command line to copy everything to a backup drive. Even when Outlook 2003 is never started xcopy will not run because somehting has locked the PST file. What is it and how do I unlock the file for backup? Do you have a PDA in its cradle? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer: Ken <anonymous@discussions.microsoft.com> asked: | Before I upgraded to Office 2003, I used a xcopy batch | file from the comm...

Security problem
My diagnostics show a security problem: http://live.iobit.com/report.php?PHPSESSID=ed4c588d953ee52139535459f16abac9 But I don't know what to do with the readout. I need help. TIA ...

Vista compatibility with Money 2005
I installed MS Money 2005 in my laptop with Vista home Premium. Had to do a recovery and reinstalled Money again. However, when I try to recover my Money backup files, it won't work. Firstly, when I browse to the backup file it gives the message 'Money will convert your file so you can work with it in Money'. Then when it tries to 'convert' the file it comes up with the message 'Money cannot locate C:\nzmoney.mny or cannot open it, possibly because it is a read only file or you do not have permission to change it or your disc drive is write protected.' What&#...

Foreign lg problems
A PC user sent me a Word document with both English and Korean. My PC opens the document and I can read both the English and the Korean. I transferred the document to my Mac OS X 2.8 for use and the Korean part is completely unreadable. I have Korean script loaded as I have used Korean, generated from this Mac on earlier occassions. This is the first time I have tried to import a Word document from a PC with a foreign language included. Any suggestions? Susan <anonymous@discussions.microsoft.com> wrote: > A PC user sent me a Word document with both English and > Korean. ...