How long labels can I insert to CTreeCtrl?

Hi,

An ancient problem is still bugging me...

My app populates a CTreeCtrl derived tree from a data file.
I put CStrings to the tree by calling

m_MyTree.InsertItem(strMyString, tParentitem);

Now, sometimes the data can be quite big. I noticed that
if the CString variable is 260 characters long it still fits into the tree
view, but
anything above that will not display entirely. It just leaves rest of the
string off.

Now, first of all, I suppose it's just not me? Maybe someone with a tree
ctrl can verify this?
(You can easily check your string length inside VC IDE by looking at the
column
indicator. And do not trust the debugger with big strings.)

Secondly, would you say that this happens "by design" and is there anything
I could do to get around this restriction?

Many thanks in advance,

Markus


0
no1 (201)
7/30/2003 7:36:36 PM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
550 Views

Similar Articles

[PageSpeed] 32

Have you tried to use TVN_GETDISPINFO notification?

"markus" <no@email.com> wrote in message
news:Ou4i0ItVDHA.2040@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> An ancient problem is still bugging me...
>
> My app populates a CTreeCtrl derived tree from a data file.
> I put CStrings to the tree by calling
>
> m_MyTree.InsertItem(strMyString, tParentitem);
>
> Now, sometimes the data can be quite big. I noticed that
> if the CString variable is 260 characters long it still fits into the tree
> view, but
> anything above that will not display entirely. It just leaves rest of the
> string off.
>
> Now, first of all, I suppose it's just not me? Maybe someone with a tree
> ctrl can verify this?
> (You can easily check your string length inside VC IDE by looking at the
> column
> indicator. And do not trust the debugger with big strings.)
>
> Secondly, would you say that this happens "by design" and is there
anything
> I could do to get around this restriction?
>
> Many thanks in advance,
>
> Markus
>
>


0
Yan
7/30/2003 10:06:00 PM
I am not at all aware about how that would get me anywhere.
Could you be more specific?

Markus


"Yan K. Avlasov" <_yan_avlasov_@_azimuth.net_> kirjoitti viestiss�
news:OZPIEbuVDHA.1560@TK2MSFTNGP11.phx.gbl...
> Have you tried to use TVN_GETDISPINFO notification?
>
> "markus" <no@email.com> wrote in message
> news:Ou4i0ItVDHA.2040@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > An ancient problem is still bugging me...
> >
> > My app populates a CTreeCtrl derived tree from a data file.
> > I put CStrings to the tree by calling
> >
> > m_MyTree.InsertItem(strMyString, tParentitem);
> >
> > Now, sometimes the data can be quite big. I noticed that
> > if the CString variable is 260 characters long it still fits into the
tree
> > view, but
> > anything above that will not display entirely. It just leaves rest of
the
> > string off.
> >
> > Now, first of all, I suppose it's just not me? Maybe someone with a tree
> > ctrl can verify this?
> > (You can easily check your string length inside VC IDE by looking at the
> > column
> > indicator. And do not trust the debugger with big strings.)
> >
> > Secondly, would you say that this happens "by design" and is there
> anything
> > I could do to get around this restriction?
> >
> > Many thanks in advance,
> >
> > Markus
> >
> >
>
>


0
no1 (201)
7/31/2003 4:50:12 PM
Well, i've just checked: TVN_GETDISPINFO isn't going to be of help. It
copies the string into some internal buffer anyway, and that buffer is 259
chars long.

The only way i can think of is to use NM_CUSTOMDRAW notification and to draw
the strings yourself.

"markus" <no@email.com> wrote in message
news:%23USp1O4VDHA.2156@TK2MSFTNGP11.phx.gbl...
> I am not at all aware about how that would get me anywhere.
> Could you be more specific?
>
> Markus
>
>
> "Yan K. Avlasov" <_yan_avlasov_@_azimuth.net_> kirjoitti viestiss�
> news:OZPIEbuVDHA.1560@TK2MSFTNGP11.phx.gbl...
> > Have you tried to use TVN_GETDISPINFO notification?
> >
> > "markus" <no@email.com> wrote in message
> > news:Ou4i0ItVDHA.2040@TK2MSFTNGP10.phx.gbl...
> > > Hi,
> > >
> > > An ancient problem is still bugging me...
> > >
> > > My app populates a CTreeCtrl derived tree from a data file.
> > > I put CStrings to the tree by calling
> > >
> > > m_MyTree.InsertItem(strMyString, tParentitem);
> > >
> > > Now, sometimes the data can be quite big. I noticed that
> > > if the CString variable is 260 characters long it still fits into the
> tree
> > > view, but
> > > anything above that will not display entirely. It just leaves rest of
> the
> > > string off.
> > >
> > > Now, first of all, I suppose it's just not me? Maybe someone with a
tree
> > > ctrl can verify this?
> > > (You can easily check your string length inside VC IDE by looking at
the
> > > column
> > > indicator. And do not trust the debugger with big strings.)
> > >
> > > Secondly, would you say that this happens "by design" and is there
> > anything
> > > I could do to get around this restriction?
> > >
> > > Many thanks in advance,
> > >
> > > Markus
> > >
> > >
> >
> >
>
>


0
Yan
7/31/2003 6:01:02 PM
Hello Markus,

I am looking for somebody who could help you on it. Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: "markus" <no@email.com>
!References: <Ou4i0ItVDHA.2040@TK2MSFTNGP10.phx.gbl> <OZPIEbuVDHA.1560@TK2MSFTNGP11.phx.gbl> 
<#USp1O4VDHA.2156@TK2MSFTNGP11.phx.gbl> <uUph124VDHA.2260@TK2MSFTNGP09.phx.gbl>
!Subject: Re: How long labels can I insert to CTreeCtrl?
!Date: Fri, 1 Aug 2003 08:55:34 +0300
!Lines: 72
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <OGn5HG$VDHA.532@TK2MSFTNGP09.phx.gbl>
!Newsgroups: microsoft.public.vc.mfc
!NNTP-Posting-Host: mat089154.oulu.fi 130.231.89.154
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.vc.mfc:385352
!X-Tomcat-NG: microsoft.public.vc.mfc
!
!The only thing I was able to do so far was to handle that notification
!in my CTreeCtrl derived class. That's it. I do not know what I should
!do inside that handler  - I can't even get the HTREEITEM for getting its
!text for custom drawing.
!
!MSDN documentation about custom drawing is a big blur to me so I am
!after some solid sample code to accomplish this simple task.
!
!Markus
!
!> The only way i can think of is to use NM_CUSTOMDRAW notification and to
!draw
!> the strings yourself.
!>
!> "markus" <no@email.com> wrote in message
!> news:%23USp1O4VDHA.2156@TK2MSFTNGP11.phx.gbl...
!> > I am not at all aware about how that would get me anywhere.
!> > Could you be more specific?
!> >
!> > Markus
!> >
!> >
!> > "Yan K. Avlasov" <_yan_avlasov_@_azimuth.net_> kirjoitti viestiss�
!> > news:OZPIEbuVDHA.1560@TK2MSFTNGP11.phx.gbl...
!> > > Have you tried to use TVN_GETDISPINFO notification?
!> > >
!> > > "markus" <no@email.com> wrote in message
!> > > news:Ou4i0ItVDHA.2040@TK2MSFTNGP10.phx.gbl...
!> > > > Hi,
!> > > >
!> > > > An ancient problem is still bugging me...
!> > > >
!> > > > My app populates a CTreeCtrl derived tree from a data file.
!> > > > I put CStrings to the tree by calling
!> > > >
!> > > > m_MyTree.InsertItem(strMyString, tParentitem);
!> > > >
!> > > > Now, sometimes the data can be quite big. I noticed that
!> > > > if the CString variable is 260 characters long it still fits into
!the
!> > tree
!> > > > view, but
!> > > > anything above that will not display entirely. It just leaves rest
!of
!> > the
!> > > > string off.
!> > > >
!> > > > Now, first of all, I suppose it's just not me? Maybe someone with a
!> tree
!> > > > ctrl can verify this?
!> > > > (You can easily check your string length inside VC IDE by looking at
!> the
!> > > > column
!> > > > indicator. And do not trust the debugger with big strings.)
!> > > >
!> > > > Secondly, would you say that this happens "by design" and is there
!> > > anything
!> > > > I could do to get around this restriction?
!> > > >
!> > > > Many thanks in advance,
!> > > >
!> > > > Markus
!> > > >
!> > > >
!> > >
!> > >
!> >
!> >
!>
!>
!
!
!


0
yhhuang (111)
8/1/2003 9:38:48 AM
Reply:

Similar Artilces:

Can I prevent a #DIV/0! error from plotting on a chart
Is it possible to force an error (like #DIV/0!) to plot as if there was no information in the cell? It seems like the default is to plot the error as a zero. Text values (including "") and most errors are plotted as zero. If you can detect the error in a formula, convert it to #N/A, and many chart types will just interpolate past the missing point. =IF(ISERROR(A1/A2),NA(),A1/A2) - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ CTarantino wrote: > Is it possible to force an error (lik...

Can Outlook POP3 be configured not to download "read" emails from my ISP?
I am reconfiguring Outlook on a new machine, and I already have my original Outlook PST mounted in Outlook. I want to recreate my POP settings in Outlook on the new machine, but I don't want to connect to my ISP and have it download all my "read" emails that I keep on the server, simply because Outlook doesn't see them as already being in the local PST, and loading my PST with duplicate emails. Is this doable? Robert Gordon <rgordon@nospam.wovensystems.com> wrote: > I am reconfiguring Outlook on a new machine, and I already have my > original Outlook PST...

How can i configure entourage mail so that it is accessible outside office network as well??
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Email Client: Exchange Pls suggest how can i configure entourage mail so that it is accessible even when i am not in office network?? <br><br>thanks for the help. Hi, you use an Exchange account. You can therefore always log in via OWA (Outlook Web Access) through a web browser. If you use Snow Leopard at home, you can also configure Apple Mail to access your Exchange account. Alternatively, if you have Entourage 2008 on your Mac (any version except for the Home & Student Edition), you can also use E...

Very strange debugging results, how can this be explained???
if (ROW > 555) AfxMessageBox("ROW > 555"); if (Screen[ROW][COL] == DFA[ DFA[STATE].Next ].Pixel) The third line of the above code snippet reports an Unhandled exception in DFA.exe: 0xC0000005: Access Violation. The debugger reports that ROW = 1119664, even though the first line tests the value of ROW to report any value greater than 555, never gets invoked. How can this possibly be? How can execution possibly move from the first line, skipping the second line to the third line with a value greatly exceeding 555? What type is the ROW variable? Mark "Pet...

Can not right click items in Outlook 2003 #2
Hello, Has anyone come across a problem in Outlook 2003 11.6359.6360 SP1 where you can not right click items and get the quick menu items? So for example, if I right click a mail message nothing comes up, versus the reply, mark as read, etc items. Thanks Much Lots of people are reporting it, but we don't have a fix yet. Are you using a script blocker? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://ww...

How can i tell excel to cumalative the hours so 17:00 + 10:00 = 2.
I have designed a timesheet in excel thats works out staff hours. I want excel to have a cumalative hours section so on a day to day basis staff know how many hours they have done it total I have done a formula to add up the hours but the problem is once it reached 23:59 it goes back to 0:00 does anyone know how to do cumaltive hours and resolve the problem??? Jenniss, Format the cell (Format - Cell - Number - Custom): [hh]:mm -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "jenniss" <jenniss@discussions.microso...

How do I change a data label on an xy scatter to a unique name as.
The only way I have figured out is to create a separate series for each data point, which is tedious for 100+ points...any ideas? Hi, Try one of these free addin to link cells to data labels. This way you can have a single data series rather than multiples. Rob Bovey's Chart Labeler, http://appspro.com John Walkenbach's Chart Tools, http://j-walk.com Cheers Andy SOSCIENT wrote: > The only way I have figured out is to create a separate series for each data > point, which is tedious for 100+ points...any ideas? -- Andy Pope, Microsoft MVP - Excel http://www.andyp...

How can I get current cell row number
I need to reference the row value of the current cell in a worksheet function: = row() in VBA: activecell.row Hope this helps Rowan excelneophyte wrote: > I need to reference the row value of the current cell ...

Inserting Columns in Excel
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: intel I have just switched from a Dell to an Imac. I have such a basic question. I cannot insert rows or columns. It says something like can't shift data off of page. Any ideas? On 7/8/08 10:47 PM, in article 59b539bd.-1@webcrossing.caR9absDaxw, "Ex_Windows_User@officeformac.com" <Ex_Windows_User@officeformac.com> wrote: > Version: 2008 > Operating System: Mac OS X 10.5 (Leopard) > Processor: intel > > I have just switched from a Dell to an Imac. I have such a basic question. I > cannot...

Insert a description in the task name column and not showing the s
I am new to Office Projects 2007 and want to insert desription of projects in the task name column but do not want the days, start and finish dates to appear in respective columns. Thankyou Any line will be interpreted as a task, and you cannot avoid the dates and bars. First, try not putting anything on a line which is not a task (or a summary or a milestone). It is not a good place for free-form text, and there are better ways such as in the Notes field. But, that said, it easy to hide text in the dates, durations etc. Just format it to be white. To hide bars, just open...

Can't get into online services
I recently upgraded to 2005. When I go to check if any of my banks have online services, instead of a list of banks, I get: "To set up your accounts, you must be online. Please close Money, and then sign in to your file. When you sign in, make sure the Work offline box is cleared." I'm obviously online and able to use other online features in Money. I can download accounts manually, but I'd like to see if any banks can do it automatically. -Max In microsoft.public.money, Max wrote: >I recently upgraded to 2005. When I go to check if any of my banks have >o...

Outlook 2002 auto inserting email address
When I use Outlook 2002 to attach a document, spreadsheet or presentation to an email message, Outlook sticks four items in the document's File | Properties | Custom dialog box. They're called: _AdHocReviewCycleID _AuthorEmail _AuthorEmailDisplayName _EmailSubject I see this as an invasion of my privacy. how can I stop Outlook and all other office XP products from doing this? You can control the "Automatic Review" option off in Outlook by going to Tools/Options/Preferences/Email Options/Advanced Email Options and turning off "Add properties to attachments to enabl...

How can I fill data in a list automatically?
I have a spreadsheet laid out like a list with indented items. The first 7columns contain data pertaining to an individual, while the next 5 columns contain data about events occuring to that individual. The problem is that one individual may have several events, but the personal data is filled in only once, for the first event; the first 7 columns are simply left blank for subsequent events (these are all listed following each other). there are several thousand events in this list. How can I copy the personal data so that each row is complete, with all columns filled in? K, You'...

Can't Use an IF statement, so now what??
In columns C2:M1978 (sometimes even more columns) is the data I need to put together; in each row of each column is either a 1 or is blank. In column B2:B1978 I want to do the following: In cell B2 =if(C2="","",C1)&"; "&if(D2="","",D1)&....so on and so on. Limited to 7 embedded if statements is my issue as the columns can sometimes exceed 20+ Any ideas? I know I have done this in the past but been away from excel for so long I cannot remember....A duuuh moment Thanks Hans The limit applies to nested functions in earlier versions of...

Can't get outlook Items to Sync with Handheld
I recently made some changes with some of the software I was using o my handheld and PC using outlook 2003. As a result I can no longe get outlook to sync with my Hand held. It synchronizes the syste info as well as avantgo etc, but as soon as it tries to syn calendar,contacts, tasks, or notes it just hangs there and eventuall I have to use the task manager to shut it down. It does not create new log file or summary so that I can see what happened. Has anyon else experienced this and found a solution Ott Otto Wenger <owenger@mchutchison-dot-com.no-spam.invalid> wrote: > I recentl...

Insert file name into Cell
Is there a way to insert the file name into a cell, rather than on header/footer? Hi Bonny, 1996FEDT.XLS =MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1) D:\driveM\excel\TAXES\1996FEDT.XLS [Sheet1] =SUBSTITUTE(SUBSTITUTE(CELL("filename",A1),"[",""),"]"," [") & "]" for more information, worksheet examples, and coding examples for pathname, filename, sheetname and combinations of ...

Can I protect but allow filtering ?
I want to lock a file, but allow users to use Autofilter. I dont see an option to do this in Excel 2000, but in 2002, I went to Tools - Protection - Protect Sheet, and selected "allow users to use autofilter", but autofilter is still greyed out. Can this be done ? ...

Can I change the default syle for a chart?
I have toyed around with using macros to reformat data, but what I would really like to do is make a particular format the default, but can't seem to find out how to do that. Select a chart in your workbook Choose Chart>Chart Type Select one of the chart types and subtypes, then click 'Set as default chart' OR Select the Custom Types tab, and set one of the built-in or user-defined charts as the default Jon Peltier has information on custom chart types on his web site: http://peltiertech.com/Excel/ChartsHowTo/CreateCustomTypes.html Argus Finch wrote: > I hav...

Can't delete file in Outlook express outbox
I have a large email file in my outbox that won't send and I can' delete it -- PhoenixVP ----------------------------------------------------------------------- PhoenixVPC's Profile: http://www.msusenet.com/member.php?userid=468 View this thread: http://www.msusenet.com/t-187101402 PhoenixVPC, you wrote on Fri, 26 Aug 2005 13:46:14 -0500: > I have a large email file in my outbox that won't send and I can't > delete it. Close Outlook Express and search for the file "Outbox.dbx" on your system. Delete it an restart OE. Best Regards Christian Goeller -...

Trouble Installing CRM - SQL Server
The CRM install gets stuck trying to find the SQL Server. Errors: "Can't find" or "SQL Agent must be on" yet it is on - I can SQL ping the server from the CRM server. The CRM admin has top Forest access to the SQL server. I've recycled the SQL services, rebooted booth CRM and SQL servers. Very misterious. Anybody have any ideas? I had some issues with this. I re-installed SQL server. It seems there is any issue with CRM and SQL if you add active directory to a server after you install SQL. "Darryl" wrote: > The CRM install gets stuck trying to...

Insert Signature Missing (Outlook 2003)
I have two signatures configured in Outlook 2003 and have neither of them configured to be automatically inserted. Instead, I want to insert one of them on a case by case basis through the "Insert\Signature" menu. However, the Signature menu option is MISSING! Outlook 2003 Help indicates that it should be there, but it's not! Please help. ...

Assetindex variable type to long int
Fixed asset tables allow for more than 32767 records. The index field for fixed assets is int. This limits a search based on the index to 32767. The index should allow for how many records the table will hold. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://...

Can I use gdi+ in vs 6?
in "stdafx" I add #if defined(_WIN64) typedef unsigned __int64 ULONG_PTR; #else typedef unsigned long ULONG_PTR; #endif #include "gdiplus.h" #pragma comment( lib, "gdiplus.lib" ) and CWinApp::InitInstance(); ��Gdiplus::GdiplusStartupInput gdiplusStartupInput; ��Gdiplus::GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL); Gdiplus::GdiplusShutdown(m_gdiplusToken); ��return CWinApp::ExitInstance(); It compiles OK. But when I add Graphics graphics( pDC->m_hDC ); it tell me error C2065: 'Graphics' : undeclared identifier why ??ho...

Can I move an old user's email to a public folder?
I am running Exchange 2000 and would like to move some ex-employees emails to a public folder accessed by a select few. The employee's account is disabled, but his email is still active because of the nature of our business. Is this possible? Thank you in advance. Frank On Thu, 8 Jun 2006 07:47:02 -0700, Zach <zach@news.postalias> wrote: >I am running Exchange 2000 and would like to move some ex-employees emails to >a public folder accessed by a select few. The employee's account is >disabled, but his email is still active because of the nature of our >bu...

how do I insert an envelope into an existing word document?
I would like to attach an envelope into an existing word document in order to accomplish both tasks of printing a letter and an envelope addressed to that individual using mail merge. With the document open, go to Tools | Letters and Mailings | Envelopes and Labels. On the Labels tab, create your envelope (if you have the address selected in your document, it will be automatically inserted) and click Add to Document. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "cruza2" <cruza2@discussions.microsoft....