Click here to Skip to main content
16,012,116 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralThere is no source code available for the current location. Pin
Øivind22-Jun-04 0:05
Øivind22-Jun-04 0:05 
GeneralSearch installed modem Pin
El'Cachubrey21-Jun-04 23:52
El'Cachubrey21-Jun-04 23:52 
GeneralRe: Search installed modem Pin
Branislav22-Jun-04 1:00
Branislav22-Jun-04 1:00 
GeneralDetecting drag on a window title bar Pin
Anonymous21-Jun-04 23:17
Anonymous21-Jun-04 23:17 
GeneralMicrosoft recommends C++ for .NET 2.0 and Longhorn Pin
Kevin McFarlane21-Jun-04 22:59
Kevin McFarlane21-Jun-04 22:59 
GeneralRe: Microsoft recommends C++ for .NET 2.0 and Longhorn Pin
Antony M Kancidrowski22-Jun-04 3:44
Antony M Kancidrowski22-Jun-04 3:44 
GeneralRe: Microsoft recommends C++ for .NET 2.0 and Longhorn Pin
Kevin McFarlane22-Jun-04 3:57
Kevin McFarlane22-Jun-04 3:57 
QuestionIhow an item of CTreeCtrl store two string? Pin
Member 62183621-Jun-04 22:49
Member 62183621-Jun-04 22:49 
I use SetItemText to store title,that's ok.but SetItemData store URL have some question.why result is often wrong?
how to use SetItemData?
very very thx poor english


insert an item to a tree


code:--------------------------------------------------------------------------------

for (int i = 0;...; i++)
{
....
htiChild = m_etc.InsertItem(m_strNewDir, hti, TVI_LAST);

CString strItemData= "www.aaa.com";
lpszItemData = new TCHAR[strItemData.GetLength()+1];
lpszItemData = (LPCTSTR)strItemData;
m_etc.SetItemData(htiChild, (DWORD)lpszItemData);
}
--------------------------------------------------------------------------------


save tree to a file

code:--------------------------------------------------------------------------------

for(..)
{LPCTSTR pItemData;
strTitle = GetItemText(hti);
pItemData = (LPCTSTR)GetItemData(hti);
CString strItemData(pItemData);
str = strTitle + strItemData;

save str
}
--------------------------------------------------------------------------------


lLoad the file to a tree

code:--------------------------------------------------------------------------------

for (iCount = 0; ...iCount++)
{
strItemText = strItem.Left(n);
lpszItemText = strItemText.GetBuffer();
strItemText.ReleaseBuffer();

strItemData = strItem.Right(strItem.GetLength() - n - 5);
lpszItemData = new TCHAR[strItemData.GetLength()+1];
lpszItemData = strItemData;

InsertItem(lpszItem, hParent, hInsertAfter);
SetItemData(htiSon, (DWORD)lpszItemData);
......
}


AnswerRe: Ihow an item of CTreeCtrl store two string? Pin
palbano22-Jun-04 5:59
palbano22-Jun-04 5:59 
GeneralGreek leters and subscripts Pin
André Dewispelaere21-Jun-04 22:44
André Dewispelaere21-Jun-04 22:44 
GeneralRe: Greek leters and subscripts Pin
Johan Rosengren21-Jun-04 23:46
Johan Rosengren21-Jun-04 23:46 
GeneralVery simple C++ question - include files Pin
Indrawati21-Jun-04 22:36
Indrawati21-Jun-04 22:36 
GeneralRe: Very simple C++ question - include files Pin
V.21-Jun-04 23:10
professionalV.21-Jun-04 23:10 
GeneralRe: Very simple C++ question - include files Pin
Bob Stanneveld22-Jun-04 1:48
Bob Stanneveld22-Jun-04 1:48 
GeneralRe: Very simple C++ question - include files Pin
Kevin McFarlane22-Jun-04 4:05
Kevin McFarlane22-Jun-04 4:05 
GeneralRe: Very simple C++ question - include files Pin
Jeremy Falcon22-Jun-04 5:45
professionalJeremy Falcon22-Jun-04 5:45 
GeneralRe: Very simple C++ question - include files Pin
gamitech22-Jun-04 13:10
gamitech22-Jun-04 13:10 
GeneralDisplay My Computer folder in a CFileDialog Pin
Filomela21-Jun-04 22:23
Filomela21-Jun-04 22:23 
GeneralRe: Display My Computer folder in a CFileDialog Pin
V.22-Jun-04 2:56
professionalV.22-Jun-04 2:56 
GeneralRe: Display My Computer folder in a CFileDialog Pin
David Crow22-Jun-04 3:00
David Crow22-Jun-04 3:00 
GeneralCan't open vcproj files created for C++ projects Pin
naamazur21-Jun-04 22:10
naamazur21-Jun-04 22:10 
QuestionHow to get back color of a dialog? Pin
freehawk21-Jun-04 21:28
freehawk21-Jun-04 21:28 
AnswerRe: How to get back color of a dialog? Pin
Filomela21-Jun-04 22:25
Filomela21-Jun-04 22:25 
AnswerRe: How to get back color of a dialog? Pin
David Crow22-Jun-04 3:26
David Crow22-Jun-04 3:26 
GeneralRe: How to get back color of a dialog? Pin
freehawk22-Jun-04 14:53
freehawk22-Jun-04 14:53 

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.