Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Need information about how to send emails in VC++ Pin
Iain Clarke, Warrior Programmer18-Mar-09 0:57
Iain Clarke, Warrior Programmer18-Mar-09 0:57 
AnswerRe: Need information about how to send emails in VC++ Pin
ky_rerun18-Mar-09 3:58
ky_rerun18-Mar-09 3:58 
AnswerRe: Need information about how to send emails in VC++ Pin
Eytukan18-Mar-09 4:02
Eytukan18-Mar-09 4:02 
QuestionUnhandled exception when exiting application??? Pin
llp00na18-Mar-09 0:30
llp00na18-Mar-09 0:30 
AnswerRe: Unhandled exception when exiting application??? Pin
gayatri.neelema18-Mar-09 1:20
gayatri.neelema18-Mar-09 1:20 
AnswerRe: Unhandled exception when exiting application??? Pin
Eytukan18-Mar-09 4:07
Eytukan18-Mar-09 4:07 
QuestionHow to display the content of particular folder in Tree control? Pin
AnithaSubramani18-Mar-09 0:26
AnithaSubramani18-Mar-09 0:26 
AnswerRe: How to display the content of particular folder in Tree control? Pin
Iain Clarke, Warrior Programmer18-Mar-09 0:36
Iain Clarke, Warrior Programmer18-Mar-09 0:36 
In the old days, there was a very nice function called DlgDirList (and DlgDirListComboBox) which filled a listbox / combobox with the files in a directory.

But there is no equivalent for a Tree Control, sorry.

You need to combine two bits of knowledge:

1/ FindFirstFile / FindNextFile to loop through all the files in a directory that match (eg) "*.txt".
FindFirstFile has a decent bit of code sample in its documentation that will be better than anything I can quickly type.

2/ And CTreeCtrl::InsertItem to put those items in the tree.

Lastly, download my article: http://www.codeproject.com/KB/system/Drive_Detect.aspx[^], and look in the code. It has code to construct an imagelist with the pictures for the different drives in it. This stage is optional, but little pretty pictures never hurt!

Good luck,

Iain.

In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

JokeRe: How to display the content of particular folder in Tree control? Pin
Eytukan18-Mar-09 4:11
Eytukan18-Mar-09 4:11 
GeneralRe: How to display the content of particular folder in Tree control? Pin
Iain Clarke, Warrior Programmer18-Mar-09 4:50
Iain Clarke, Warrior Programmer18-Mar-09 4:50 
GeneralRe: How to display the content of particular folder in Tree control? Pin
Michael Schubert18-Mar-09 4:38
Michael Schubert18-Mar-09 4:38 
GeneralRe: How to display the content of particular folder in Tree control? Pin
Iain Clarke, Warrior Programmer18-Mar-09 4:50
Iain Clarke, Warrior Programmer18-Mar-09 4:50 
GeneralRe: How to display the content of particular folder in Tree control? Pin
Eytukan18-Mar-09 4:57
Eytukan18-Mar-09 4:57 
AnswerRe: How to display the content of particular folder in Tree control? Pin
_AnsHUMAN_ 18-Mar-09 0:42
_AnsHUMAN_ 18-Mar-09 0:42 
AnswerRe: How to display the content of particular folder in Tree control? Pin
Stuart Dootson18-Mar-09 0:44
professionalStuart Dootson18-Mar-09 0:44 
GeneralRe: How to display the content of particular folder in Tree control? Pin
Eytukan18-Mar-09 4:14
Eytukan18-Mar-09 4:14 
Questionerror LNK2019: unresolved external symbol Pin
PankajB17-Mar-09 22:47
PankajB17-Mar-09 22:47 
AnswerRe: error LNK2019: unresolved external symbol Pin
Cedric Moonen17-Mar-09 22:55
Cedric Moonen17-Mar-09 22:55 
GeneralRe: error LNK2019: unresolved external symbol Pin
PankajB17-Mar-09 23:01
PankajB17-Mar-09 23:01 
QuestionHow to replace/change the container menu item and menu item behaviour from an activex control Pin
Member 436145517-Mar-09 22:26
Member 436145517-Mar-09 22:26 
AnswerRe: How to replace/change the container menu item and menu item behaviour from an activex control Pin
Jerry.Wang18-Mar-09 3:35
Jerry.Wang18-Mar-09 3:35 
GeneralRe: How to replace/change the container menu item and menu item behaviour from an activex control Pin
Member 436145518-Mar-09 19:30
Member 436145518-Mar-09 19:30 
QuestionA dialog with button controls does not have focus OnKeyDown Pin
AglaiaMasaki17-Mar-09 22:06
AglaiaMasaki17-Mar-09 22:06 
AnswerRe: A dialog with button controls does not have focus OnKeyDown Pin
Code-o-mat17-Mar-09 23:00
Code-o-mat17-Mar-09 23:00 
GeneralRe: A dialog with button controls does not have focus OnKeyDown Pin
AglaiaMasaki17-Mar-09 23:29
AglaiaMasaki17-Mar-09 23:29 

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.