Click here to Skip to main content
15,897,891 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to add header files from other directory? Pin
Cedric Moonen30-Nov-05 23:53
Cedric Moonen30-Nov-05 23:53 
AnswerRe: How to add header files from other directory? Pin
kakan30-Nov-05 23:54
professionalkakan30-Nov-05 23:54 
QuestionPlease Guide Pin
Ankush Mehta30-Nov-05 23:39
Ankush Mehta30-Nov-05 23:39 
AnswerRe: Please Guide Pin
kakan30-Nov-05 23:46
professionalkakan30-Nov-05 23:46 
AnswerRe: Please Guide Pin
Rajesh R Subramanian1-Dec-05 0:26
professionalRajesh R Subramanian1-Dec-05 0:26 
GeneralRe: Please Guide Pin
Ankush Mehta1-Dec-05 1:03
Ankush Mehta1-Dec-05 1:03 
GeneralRe: Please Guide Pin
Ankush Mehta1-Dec-05 18:31
Ankush Mehta1-Dec-05 18:31 
QuestionProblem using Tree Pin
Aqueel30-Nov-05 23:36
Aqueel30-Nov-05 23:36 
I am working with MFC to read the file system and populate all directories, subdirectories and files in a tree. I am using a recursive function to do it. When this function finds a directory, it calls itself for searching that directory for its inner directories and files. I included objects of HTREEITEM as root and TVINSERTITEM as tvInsert in CFileSysDlg.
I wrote following code to populate the tree

int CFileSysDlg::FindFiles(HANDLE fp, unsigned long ino, unsigned long itable_blkno)<br />
{<br />
HTREEITEM newitem = root;  // initializing root<br />
if (file_type == 2)   // if directory detected<br />
{<br />
   tvInsert.hParent = root;	<br />
   tvInsert.hInsertAfter = NULL;<br />
   tvInsert.item.mask = TVIF_TEXT;	//LPCSTR<br />
   tvInsert.item.pszText = (LPSTR)file_name;<br />
   newitem = pCtrl->InsertItem(&tvInsert);<br />
   FindFiles(fp, inodeno, itable_blkno);	<br />
}<br />
else<br />
{<br />
  if (file_type == 1)   //if file is detected<br />
  {<br />
    hPA = pCtrl->InsertItem(TVIF_TEXT,(LPSTR)file_name, 0, 0, 0, 0, 0,newitem, NULL);<br />
  }<br />
}<br />
}


Problem is that it shows me directories and subdirectories at the same level.
Please tell me how can i correct it. Please reply me as soon as possible
Thanks


We Believe in Excellence

-- modified at 5:39 Thursday 1st December, 2005
AnswerRe: Problem using Tree Pin
kakan1-Dec-05 0:12
professionalkakan1-Dec-05 0:12 
GeneralRe: Problem using Tree Pin
Aqueel1-Dec-05 0:26
Aqueel1-Dec-05 0:26 
GeneralRe: Problem using Tree Pin
kakan1-Dec-05 0:46
professionalkakan1-Dec-05 0:46 
GeneralRe: Problem using Tree Pin
kakan1-Dec-05 0:54
professionalkakan1-Dec-05 0:54 
QuestionDLL problem Pin
viliam30-Nov-05 23:00
viliam30-Nov-05 23:00 
AnswerRe: DLL problem Pin
ThatsAlok1-Dec-05 18:19
ThatsAlok1-Dec-05 18:19 
QuestionPasting the Windows Clipboard into MSHTML = RTF to HTML Conversion Pin
Neville Franks30-Nov-05 22:40
Neville Franks30-Nov-05 22:40 
AnswerRe: Pasting the Windows Clipboard into MSHTML = RTF to HTML Conversion Pin
Graham Bradshaw30-Nov-05 23:03
Graham Bradshaw30-Nov-05 23:03 
GeneralRe: Pasting the Windows Clipboard into MSHTML = RTF to HTML Conversion Pin
Neville Franks30-Nov-05 23:19
Neville Franks30-Nov-05 23:19 
Questionplease help me Pin
dSolariuM30-Nov-05 21:51
dSolariuM30-Nov-05 21:51 
QuestionProblem updating the status bar Pin
ledallam30-Nov-05 20:33
ledallam30-Nov-05 20:33 
AnswerRe: Problem updating the status bar Pin
ThatsAlok30-Nov-05 21:13
ThatsAlok30-Nov-05 21:13 
GeneralRe: Problem updating the status bar Pin
ledallam30-Nov-05 21:29
ledallam30-Nov-05 21:29 
AnswerRe: Problem updating the status bar Pin
ThatsAlok30-Nov-05 21:48
ThatsAlok30-Nov-05 21:48 
GeneralRe: Problem updating the status bar Pin
ledallam30-Nov-05 22:02
ledallam30-Nov-05 22:02 
GeneralRe: Problem updating the status bar Pin
ThatsAlok30-Nov-05 22:54
ThatsAlok30-Nov-05 22:54 
Question[Message Deleted] Pin
Sachin Gedam30-Nov-05 20:28
Sachin Gedam30-Nov-05 20:28 

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.