path name
-
I want to hide the drive name during runtime.I have displayed a directory tree in a tree control.The code looks like this, CString str = ((CIFlappApp *)AfxGetApp())->m_strAppDrive; str+="\:"; str+="\\"; str+="MyFavourites"; CString str1 = str; CreateDirectory(str,NULL); str+="\\"; CString sub = str+"Online Bookmarks"; CreateDirectory(sub,NULL); sub= str+"Music"; CreateDirectory(sub,NULL); sub= str+"Pictures"; CreateDirectory(sub,NULL); sub= str+"Documents"; CreateDirectory(sub,NULL); m_bookmark.PopulateTree(str1); Now when i run the application the tree is displayed like this, D:\My Favourites Documents Music OnLine Bookmarks Pictures I want to displat the tree like this. Favourites Documents Music OnLine Bookmarks Pictures. How can i do this.Can anyone help me in this. Thanks.
-
I want to hide the drive name during runtime.I have displayed a directory tree in a tree control.The code looks like this, CString str = ((CIFlappApp *)AfxGetApp())->m_strAppDrive; str+="\:"; str+="\\"; str+="MyFavourites"; CString str1 = str; CreateDirectory(str,NULL); str+="\\"; CString sub = str+"Online Bookmarks"; CreateDirectory(sub,NULL); sub= str+"Music"; CreateDirectory(sub,NULL); sub= str+"Pictures"; CreateDirectory(sub,NULL); sub= str+"Documents"; CreateDirectory(sub,NULL); m_bookmark.PopulateTree(str1); Now when i run the application the tree is displayed like this, D:\My Favourites Documents Music OnLine Bookmarks Pictures I want to displat the tree like this. Favourites Documents Music OnLine Bookmarks Pictures. How can i do this.Can anyone help me in this. Thanks.
-
I want to hide the drive name during runtime.I have displayed a directory tree in a tree control.The code looks like this, CString str = ((CIFlappApp *)AfxGetApp())->m_strAppDrive; str+="\:"; str+="\\"; str+="MyFavourites"; CString str1 = str; CreateDirectory(str,NULL); str+="\\"; CString sub = str+"Online Bookmarks"; CreateDirectory(sub,NULL); sub= str+"Music"; CreateDirectory(sub,NULL); sub= str+"Pictures"; CreateDirectory(sub,NULL); sub= str+"Documents"; CreateDirectory(sub,NULL); m_bookmark.PopulateTree(str1); Now when i run the application the tree is displayed like this, D:\My Favourites Documents Music OnLine Bookmarks Pictures I want to displat the tree like this. Favourites Documents Music OnLine Bookmarks Pictures. How can i do this.Can anyone help me in this. Thanks.
I add sth based on your code follow: CString drv = ((CIFlappApp *)AfxGetApp())->m_strAppDrive; drv+="\:"; drv+="\\"; CString str = drv + "MyFavourites"; CString str1 = str; CreateDirectory(str,NULL); str+="\\"; CString sub = str+"Online Bookmarks"; CreateDirectory(sub,NULL); sub= str+"Music"; CreateDirectory(sub,NULL); sub= str+"Pictures"; CreateDirectory(sub,NULL); sub= str+"Documents"; CreateDirectory(sub,NULL); str1.TrimLeft(drv); m_bookmark.PopulateTree(str1);
freeman
-
I want to hide the drive name during runtime.I have displayed a directory tree in a tree control.The code looks like this, CString str = ((CIFlappApp *)AfxGetApp())->m_strAppDrive; str+="\:"; str+="\\"; str+="MyFavourites"; CString str1 = str; CreateDirectory(str,NULL); str+="\\"; CString sub = str+"Online Bookmarks"; CreateDirectory(sub,NULL); sub= str+"Music"; CreateDirectory(sub,NULL); sub= str+"Pictures"; CreateDirectory(sub,NULL); sub= str+"Documents"; CreateDirectory(sub,NULL); m_bookmark.PopulateTree(str1); Now when i run the application the tree is displayed like this, D:\My Favourites Documents Music OnLine Bookmarks Pictures I want to displat the tree like this. Favourites Documents Music OnLine Bookmarks Pictures. How can i do this.Can anyone help me in this. Thanks.
radhika28 wrote:
I want to hide the drive name during runtime.I have displayed a directory tree in a tree control.The code looks like this, CString str = ((CIFlappApp *)AfxGetApp())->m_strAppDrive; str+="\:"; str+="\\"; str+="MyFavourites"; CString str1 = str; CreateDirectory(str,NULL); str+="\\"; CString sub = str+"Online Bookmarks"; CreateDirectory(sub,NULL); sub= str+"Music"; CreateDirectory(sub,NULL); sub= str+"Pictures"; CreateDirectory(sub,NULL); sub= str+"Documents"; CreateDirectory(sub,NULL); m_bookmark.PopulateTree(str1); Now when i run the application the tree is displayed like this, D:\My Favourites Documents Music OnLine Bookmarks Pictures I want to displat the tree like this. Favourites Documents Music OnLine Bookmarks Pictures. How can i do this.Can anyone help me in this.
could you show me piece of code , which you are using to populate item in TreeCtrl
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief And You