CTreeCtrl Question, Adding the '+' by default.

Hi,

I have a large tree control, and to save loading time I only load the root 
items and I only load the child when the user select one of the nodes.

The problem is that because the Node has no child the tree control does not 
draw the "+" to show that there are child nodes.

So how can I get the control to display the "+" to expand the node without 
actually adding child.

Many thanks

Simon. 


0
7/7/2005 10:08:36 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
481 Views

Similar Articles

[PageSpeed] 47

When creating the TVITEM, set the cChildren member to I_CHILDRENCALLBACK.  You will then need to 
handle the TVN_GETDISPINFO notification.

"Simon" <spambucket@myoddweb.com> wrote in message news:evG8wB0gFHA.328@tk2msftngp13.phx.gbl...
> Hi,
>
> I have a large tree control, and to save loading time I only load the root items and I only load 
> the child when the user select one of the nodes.
>
> The problem is that because the Node has no child the tree control does not draw the "+" to show 
> that there are child nodes.
>
> So how can I get the control to display the "+" to expand the node without actually adding child.
>
> Many thanks
>
> Simon.
> 


0
7/7/2005 10:34:11 PM
one solution might be to add just one child (if any) for each root level 
nodes.

Polaris

"Simon" <spambucket@myoddweb.com> wrote in message 
news:evG8wB0gFHA.328@tk2msftngp13.phx.gbl...
> Hi,
>
> I have a large tree control, and to save loading time I only load the root 
> items and I only load the child when the user select one of the nodes.
>
> The problem is that because the Node has no child the tree control does 
> not draw the "+" to show that there are child nodes.
>
> So how can I get the control to display the "+" to expand the node without 
> actually adding child.
>
> Many thanks
>
> Simon.
> 


0
etpolaris (100)
7/7/2005 10:37:30 PM
Reply:

Similar Artilces:

Favorite Folders reverts to default list when computer shut-down
I have no problem adding, deleting or moving folders in the Favorite Folders pane. The problem is that they all disappear and revert to the default list everytime my computer is shut down. So I have to keep adding the folders back in Is there a way to keep the shortcut folders in the Favorite Folders pane? ...

Adding to existing code (Clarification of earlier post)
After rereading my earlier post, I find that I wasn't very clear. I'll try again. My existing code works to give me the sum of all Weeks Service where the Department Name is equal to the Current Department Name and I do want to keep that code. In addition to that code though, I need to add, I'm guessing, an "IF Statement" that will provide me with the sum of ALL Weeks Service of ALL Department Name IF the Current Department Name is equal to "Reserves". Example: Department Name Weeks Service Millwright ...

Adding VAT fractions
Hello All, I am using a spreadsheet to calculate VAT. Format is set to two decimal places, have tried number, currency and accounting methods. Formula is entered as eg: =A8*7/47 (VAT fraction is 7/47). Answers are displayed correctly to two decimal places but when adding the column, Excel adds answer to formula NOT answers displayed in cells. So, although technically correct, answer is usually a penny or two out. I need it to add what is displayed. Anyone know how to do this? Thanks Kirsty. Scott, When calculating the VAT, round it to 2 dec places, then it should sum correctly, that is ...

Usage Question
Hi, Not sure if this is the proper arena for this post, but.... Have a usage / functional question regarding Outlook, suspect this is a common problem with many... Here is the scenario: 1. Send an email to someone, do NOT copy the email to myself so it just goes in my sent mail. Here are two problems that arise out of this function: 1. If I am awaiting for a response / need a response to that email what is the BEST way to re-tickle myself if in fact a response to that email is not received? At this time I remember manually in some form a flag, task or just plain old memory. 2. Once ...

Date question 01-14-10
Can anyone help with this function: =IF[Date Parts Ordered Completed]+ [Date Part Completed]+[Date Purchasing Completed],not blank,=Date The goal is that is all three fields have a date in them, then put in today's date in the final field. If one of the dates is missing, then the final date is blank. The only problem is if I open up that form I do not want it to change the date to today. I want it to stay the date of the actual completion. Any help is greatly appreciated. Thanks, P-Chu -- Message posted via http://www.accessmonster.com Try this -- Completion_...

School question
True or Faled The Table Template is used to automate data entry in a table. We don't typically answer school questions in these newsgroups, but even if we were going to, we generally like the question to be complete and make sense. -Scott "deborah Camp" <deborahCamp@discussions.microsoft.com> wrote in message news:E79CEB83-12AC-4B88-8146-5ACED58279A2@microsoft.com... > True or Faled The Table Template is used to automate data entry in a > table. Scott M. wrote: > > "deborah Camp" <deborahCamp@discussions.microsoft.com> w...

OWA Question #10
Hello, we're running Exchange 2003 and I have the following situation. Several employees in our company decided to start a different branch. Instead of creating a separate domain we just created a new account in AD with a different domain suffix. So let's say they used to have account@companyA.com. But now they have account@companyB.com. They've been able to access email via Outlook just fine but when accessing it via OWA, they are unsuccessful. We've tried logging them in with both companyA.com and companyB.com domains in the login screen. companyA.com just retur...

And introducing... The Default Text Box Add-in!!
Default Text Box for Publisher 2002/2003 allows you to save defaults for text boxes in Publisher 2002 (which before now has been impossible) and to save these defaults for use in future publications (which isn't even possible with Publisher 2003!) Download it now from http://www.mvps.org/the_nerd/Publisher/add-ins.htm Go on, give it a go - it's free! -- Ed Bennett - MVP Microsoft Publisher http://www.mvps.org/the_nerd/ Before reading this message, view the disclaimer: http://mvps.org/the_nerd/disclaim.htm I don't want add-ons for 2002 - I want 2003! "Ed Bennett" <...

Outlook keeps making itself Default
Hi, Everytime I start Outlook it takes over as default for email and addresses even though I have that option unchecked in outlook, and in IE I set OE Express as default, yet each time I launch outlook it takes over as Default, any ideas TIA Wayne ...

continous form question
Hi, I have a 'continous form' which gets its data from a table. Im using a form for ease of use by the operator and data is displayed in text boxes. My form has 6 columns and thousands of rows - so many records in the table. (its pretty much like an excel spreadsheet). However, on my form, i have a text box and i want the text box to change to eg VBred, if the time on the current record matches the time on the next record. (obvousley time is one of the pieces of data and displayed as hh:mm) As my form is a continous form, if i add my 'colour' text box to ...

adding a zero in front of number
how do you add a zero in front of other numbers, I am using item numbers and most start with zero, just shows whole numbers when I enter. example 095421 when I enter shows 95421. help. Hi When the number must remain numeric data, then format the cell as Custom "00000" (the number of 0's determines to which length is the entry padded). When you want the number to be converted to string, then use the formula (in my example the original number resides in cell A1) =TEXT(A1,"00000") (again, the number of 0's in format string determines the length of padding) Arvi ...

File Conversion Question
backup.pst Outlook 2003 version Can this be converted to be restored into Outlook 2002? What other possible solutions could be employed? Thank you. denise.ciaralli@bell.ca <anonymous@discussions.microsoft.com> wrote: > backup.pst Outlook 2003 version > > Can this be converted to be restored into Outlook 2002? Only by using Outlook 2003 to create a 2002-format PST and then copying or exporting the data to the 2002-format PST. -- Brian Tillman Thank you! >-----Original Message----- >denise.ciaralli@bell.ca <anonymous@discussions.microsoft.com> wrote: > >...

Excel Question: How to Delete All Blank Rows from a worksheet?
Hi, I'm brand new, and that is my question. I just spent 2 hour laboriously mousing along deleting row by row, every other row thinkin there's gotta be a better way. (I could've done it of course if the were adjacent, but they were interspersed with my good data). I'm little behind the times: agile with keystrokes but less so with mous [think I was quicker in Lotus DOS! (actually "TWIN")]. But I do play mean piano -- Message posted from http://www.ExcelForum.com Check out: http://www.cpearson.com/excel/deleting.htm#DeleteBlankRows "DaveThePianoGuy >...

Updating MS Office 98 for Mac to newer MS Office version & other questions
Hi! I have a Mac iBook with a Power PC G3 Processor, Disk Cache: 4096k, Virtual Memory 129 MB, Built-In Memory 128 MB, Machine Speed 600MHz (so it says in the system profiler...I don't really know what all this means and if someone has an easy explanation, I'd appreciate it). Though it came with OSX, I have been running it on OS 9.2 because I purchased Microsoft Office 98 for Mac (Word, Excel, Powerpoint) back in 1999 for my last Mac (a desktop), so I loaded it onto this iBook when I got it. My question is, can I qualify for an update of MS Office? From browsing the web I noticed ther...

Adding data to a list
I have a list of data that I want to add to or subtract from and I would like to be able to click on a button which would bring up a text box where I could insert the new data then sort the new list. Thanks, Mike Take a look at data>form -- Regards, Peo Sjoblom "Mike" <mike@ehb-docks.fsbusiness.co.uk> wrote in message news:bultp0$8ee$1@news8.svr.pol.co.uk... > I have a list of data that I want to add to or subtract from and I would > like to be able to click on a button which would bring up a text box where I > could insert the new data then sort the ne...

General SOA question
As I was reading SOA Manifiesto, one line got my attention "SOA can be realized through a variety of technologies and standards." as of now, only way I can think of implementing bussiness service at this time which is decoupled and scalable is though web services. This gives cross platform/scalable/maintainable. Is there any other way we can implement services which has the same things? Thanks, I just started working with SOA, and the way I understand it (which is not very thorough at that) is that SOA is basically web services taken to the next level of interoperability (a...

Public Folder Question #4
Is there a way to enumerate all folders and posts (including attachment labels where applicable) and redirect to a text file or CSV in a similar fashion that the DOS tree /F /A command would work? Thanks! ...

adding a line to an existing chart
Hi, I have a chart with bars and two lines but I want to add another line on top of what I already have...can I do this if so, how? I have tried many things but it is not showing up. Please provide as much detail as possible, as I am fairly new to this. JudyT Select the data for the new line (say F2:F20) Click the Copy tool Click the chart Use menu command Edit | Past Special; specify New Series; click OK Suppose the data is G2:F20 with new x-values in column F Select the data for the new line (say G2:F20) Click the Copy tool Click the chart Use menu command Edit | Past Special; speci...

Cannot use default SMTP Virtual Server
Hello All, I this problem since yesterday Actually I post this already and get some reply but that doesnt solve it. Again my problem is: I have newly setuo exhcange 2003 (SBS 2003) everythng works fine until I test for open relay (using telnet om port 25) and found that it was indeed open. So I check KB and follow intruction to allo only this IP block to relay mail 192.168.0.0 255.255.255.0 but when I try to telnet again the server on port 25 I cannot connecto it anymore. I restarted the service even the server itself but still I cannot connect to it. NOTE: I can connect with port...

Missing default SMTP virtual server
I have just been given the task to configure the IMF in our exchange setup, but have found what appears to be a problem. The Default SMTP Virtual Server is missing. Is there any way to re-instate it, or is this a sign of potentially bigger problems in our setup? Regards Chris Bartholomeusz Are you sure this was not just renamed? Do you see any virtual servers under SMTP Protocols. If yes then work with that to enable IMF. cheers, Alexander Zammit WinDeveloper Software IMF Tune - Unleash the Full Intelligent Message Filter Power http://www.windeveloper.com/imftune/ "Barton1967&q...

Adding Toolbar to CDialog
Hello, I have a CMenu object that is attached to my dialog at the top and I am trying to add a Toolbar under the menu. This is how I am trying to add a toolbar to my dialog box: int CSvg::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDialog::OnCreate(lpCreateStruct) == -1) return -1; //This adds CWebBrowser2 object and works OK if ( ! m_explore.Create( NULL, WS_CHILD | WS_VISIBLE, CRect(), this, IDC_EXPLORER3 ) ) return -1; //this does NOT add toolbar and it does NOT work OK if (!m_toolbar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_SIZE_DYNAMIC | CBRS_TOP | CBRS_TOOLTIPS | CBR...

Profile question...
One of the small networks I manage had a Win2k DC that crashed. We replaced it with a 2008 SBS & since most of the clients were XP, I was able to join computers to the new domain & copy the profiles from the old location to the new location. That was until I got to the Vista laptop. On this computer, the profile shows as 'Unknown' & the 'copy to' option is grayed out. I am currently copying the contents of the C:\Users\username folder to the C:\Users\user.newdomain folder. Will this be all I need? Is there an easier way? Also, under system properties>u...

Adding multiple tables in one report
I am trying to customize the default report Daily Detailed Sales with Tax. What i need to do is add the Tender Type (Credit card / cash / check) as another column in the report. So far i have found out: i need to add a column i need to import the TenderEntry table for the data I need to find out: How to import another table I have tried to import the table using sql UNION function, but that wont work for me either. any help would be greatly appriciated. Thank You Hi ED, The things make sense to me regarding the adding tables and fields which you can do and customized the .grp file. ...

Cell Reference question
This is probably a simple question, but I have never seen it before. I have been looking at some spredsheets sent by some co-workers, trying to figure out their structure etc... and I have seen some cell references where the reference starts with an =+'sheetname!e2 The + (plus sign) struck me as odd, I can't recall seeing that before. Is there some significance to it? Thanks Tom Believe it's a "legacy" behaviour for die-hard Lotus converts <g> The "+" is not necessary .. -- Rgds Max xl 97 --- Please respond in thread xdemechanik <at>yahoo<dot&g...

Default Domain Policy?
Isn't the default domain policy supposed to show up under the Group Policy tab on all property sheets for OU's? I can see the the policy is applied at the domain level but it doesn't show up under any of the OU's properties on the group policy tab. Is that normal? Also note that there is no blocking set. Thanks, Dan No. The Default Domain Policy will only show up on the properties of the domain itself. It will then propagate down and apply to all sub-OU's unless you have inheritance turned off. Depending on which tool you use to view GPO's, it can make mo...