Click here to Skip to main content
15,910,878 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBasic OOP Question Pin
AJ1234-Feb-02 6:12
AJ1234-Feb-02 6:12 
GeneralRe: Basic OOP Question Pin
Joaquín M López Muñoz4-Feb-02 6:24
Joaquín M López Muñoz4-Feb-02 6:24 
GeneralRe: Basic OOP Question Pin
AJ1237-Feb-02 1:23
AJ1237-Feb-02 1:23 
GeneralRe: Basic OOP Question Pin
Joaquín M López Muñoz7-Feb-02 2:13
Joaquín M López Muñoz7-Feb-02 2:13 
GeneralAvailable Comm Ports Pin
Steve Thresher4-Feb-02 6:12
Steve Thresher4-Feb-02 6:12 
GeneralRe: Available Comm Ports Pin
Rick York4-Feb-02 6:44
mveRick York4-Feb-02 6:44 
GeneralRe: Available Comm Ports Pin
Steve Thresher5-Feb-02 2:10
Steve Thresher5-Feb-02 2:10 
QuestionRestrictions of TreeControl under XP [or just another XP bug]? Pin
Andreas Saurwein4-Feb-02 5:56
Andreas Saurwein4-Feb-02 5:56 
I'm currently having problems with inserting/displaying large amounts of items in a treectrl under XP. It seems that there is a limit on the amount of manageable subitems.
When adding more than 65.000 elements under one node (yes, i know thats too much to be useful for the user), the tree starts to behave strange: items disapear, nodes disapear, focus disapears, the scrollbar is not in sync with the content, etc.
All this under XP build 2600.

If you want to try, just create a simple dialog based application with a treectrl and add the following code into the OnInitDialog() function:
<br />
	HWND	hTree = ...your handle here;<br />
	TCHAR	buf1[64];<br />
	TCHAR	buf2[64];<br />
<br />
	TVINSERTSTRUCT is;<br />
	is.hParent = TVI_ROOT;<br />
	is.hInsertAfter = TVI_ROOT;<br />
	is.itemex.mask = TVIF_TEXT;<br />
	is.itemex.pszText = _T("Root");<br />
<br />
	HTREEITEM hItem = TreeView_InsertItem(hTree, &is);<br />
	<br />
	is.hParent = hItem;<br />
	is.hInsertAfter = TVI_LAST;<br />
	<br />
        // this takes a hell of a time :-(<br />
        for(int i = 0; i < 5; ++i)<br />
	{<br />
		sprintf(buf1, _T("SubItem %05i"), i);<br />
		is.itemex.pszText = &buf1[0];<br />
		<br />
		HTREEITEM hSubItem = TreeView_InsertItem(hTree, &is);<br />
		TVINSERTSTRUCT is2 = is;<br />
<br />
		is.hParent = hSubItem;<br />
		is.itemex.pszText = &buf2[0];<br />
		for(int n = 0; n < 1024*65; ++n)<br />
		{<br />
			sprintf(buf2, _T("Item %03i/%06i"), i, n);<br />
			TreeView_InsertItem(hTree, &is2);<br />
		}<br />
	}<br />


And there is no difference between using CTreeCtrl::InsertItem or the SDK macro.

cheers
Andreas
QuestionWhat does an object REALLY look like? Pin
Jamie Hale4-Feb-02 5:51
Jamie Hale4-Feb-02 5:51 
AnswerRe: What does an object REALLY look like? Pin
Joaquín M López Muñoz4-Feb-02 6:04
Joaquín M López Muñoz4-Feb-02 6:04 
GeneralRe: What does an object REALLY look like? Pin
Jamie Hale4-Feb-02 6:32
Jamie Hale4-Feb-02 6:32 
GeneralRe: What does an object REALLY look like? Pin
Joaquín M López Muñoz4-Feb-02 7:25
Joaquín M López Muñoz4-Feb-02 7:25 
GeneralRe: What does an object REALLY look like? Pin
Jamie Hale4-Feb-02 7:56
Jamie Hale4-Feb-02 7:56 
GeneralRe: What does an object REALLY look like? Pin
4-Feb-02 8:05
suss4-Feb-02 8:05 
GeneralRe: What does an object REALLY look like? Pin
Jamie Hale4-Feb-02 9:34
Jamie Hale4-Feb-02 9:34 
GeneralRe: What does an object REALLY look like? Pin
Joaquín M López Muñoz4-Feb-02 8:20
Joaquín M López Muñoz4-Feb-02 8:20 
GeneralRe: What does an object REALLY look like? Pin
Jamie Hale4-Feb-02 9:12
Jamie Hale4-Feb-02 9:12 
GeneralRe: What does an object REALLY look like? Pin
Joaquín M López Muñoz4-Feb-02 9:22
Joaquín M López Muñoz4-Feb-02 9:22 
GeneralRe: What does an object REALLY look like? Pin
Jamie Hale4-Feb-02 9:32
Jamie Hale4-Feb-02 9:32 
GeneralRe: What does an object REALLY look like? Pin
Jamie Hale4-Feb-02 9:39
Jamie Hale4-Feb-02 9:39 
GeneralRe: What does an object REALLY look like? Pin
Joaquín M López Muñoz4-Feb-02 11:21
Joaquín M López Muñoz4-Feb-02 11:21 
GeneralRe: What does an object REALLY look like? Pin
Jamie Hale4-Feb-02 18:25
Jamie Hale4-Feb-02 18:25 
GeneralRe: What does an object REALLY look like? Pin
4-Feb-02 9:48
suss4-Feb-02 9:48 
GeneralRe: What does an object REALLY look like? Pin
Jamie Hale4-Feb-02 9:50
Jamie Hale4-Feb-02 9:50 
GeneralRe: What does an object REALLY look like? Pin
4-Feb-02 11:19
suss4-Feb-02 11:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.