Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CString to LPCTSTR Pin
Gary R. Wheeler20-Sep-03 3:33
Gary R. Wheeler20-Sep-03 3:33 
GeneralReading/Writing XP registry files Pin
skaanji19-Sep-03 6:34
skaanji19-Sep-03 6:34 
GeneralRe: Reading/Writing XP registry files Pin
David Crow19-Sep-03 7:40
David Crow19-Sep-03 7:40 
GeneralRe: Reading/Writing XP registry files Pin
skaanji19-Sep-03 8:21
skaanji19-Sep-03 8:21 
GeneralRe: Reading/Writing XP registry files Pin
David Crow19-Sep-03 8:26
David Crow19-Sep-03 8:26 
GeneralRe: Reading/Writing XP registry files Pin
ZoogieZork19-Sep-03 8:56
ZoogieZork19-Sep-03 8:56 
GeneralRe: Reading/Writing XP registry files Pin
skaanji19-Sep-03 9:39
skaanji19-Sep-03 9:39 
QuestionHow to save the structure of a tree view? Pin
Kayembi19-Sep-03 6:34
Kayembi19-Sep-03 6:34 
Hi,

I am nearing the completion of my app (and a big thank you to everyone here who has helped me so far - I've received a lot of help and do really appreciate it). I am currently working on saving project files, but there is one aspect of my app I have no idea how to go about saving, and would be very grateful for some advice.

Part of my app works a little like Windows Explorer. On the left there is a folder tree and on the right a file list. The user can create a file tree containing a number of files, and upon hitting a "Build" button, the folder tree he or she has defined is created on disk, and the specified files copied into these folders (you may wonder what the advantage of this method is over just letting my user do all this in Windows Explorer, but trust me that this makes sense in the context of the rest of my app - for instance, the paths of the folders are stored as command-line parameters etc).

So far, so good. However, when my user goes to save a project, the project must save the directory tree that he has created, and it is this that I do not know how to achieve. The directory tree is just a tree view - ie. a sequence of HTREEITEMs. On saving a project, the app needs to look at the tree view and save the structure, which can of course consist of an unlimited number of HTREEITEMS organised in any order with various properties. Upon loading a project, the app needs to be able to reconstruct this tree view just as it has been saved.

I thought of using a string array to hold the paths of the folders and try to reconstruct them from the paths, and using a number array to hold the properties, but this seems a very long-winded way of doing it.

Can anybody suggest a good method of dealing with this? I'm using the straight Windows API with _no_ MFC, but that shouldn't make too much difference as I'm not asking for code so much as for ideas about how one goes about storing information about something as complex and arbitrary as a customisable tree view.

Many thanks for any help,
KB
AnswerRe: How to save the structure of a tree view? Pin
l a u r e n20-Sep-03 6:04
l a u r e n20-Sep-03 6:04 
QuestionBetter way of changing window title and icon at run-time? Pin
Kayembi19-Sep-03 6:21
Kayembi19-Sep-03 6:21 
GeneralTool Tip Appearance Time Pin
Marty1020304019-Sep-03 6:11
Marty1020304019-Sep-03 6:11 
Generalmail verifier Pin
Max Santos19-Sep-03 5:53
Max Santos19-Sep-03 5:53 
GeneralInstallshield DLL Problem Pin
Anonymous19-Sep-03 5:42
Anonymous19-Sep-03 5:42 
GeneralInstallshield Pin
Anonymous19-Sep-03 5:36
Anonymous19-Sep-03 5:36 
QuestionHow to create a VC program to read text Pin
harshsingh19-Sep-03 5:13
harshsingh19-Sep-03 5:13 
AnswerRe: How to create a VC program to read text Pin
keegan19-Sep-03 5:41
keegan19-Sep-03 5:41 
GeneralRe: How to create a VC program to read text Pin
harshsingh21-Sep-03 18:24
harshsingh21-Sep-03 18:24 
GeneralRe: How to create a VC program to read text Pin
keegan21-Sep-03 20:58
keegan21-Sep-03 20:58 
AnswerRe: How to create a VC program to read text Pin
PremL19-Sep-03 5:48
PremL19-Sep-03 5:48 
GeneralModal dialog does not come to the foreground Pin
Salvador Dali19-Sep-03 5:07
Salvador Dali19-Sep-03 5:07 
GeneralRe: Modal dialog does not come to the foreground Pin
JWood19-Sep-03 5:17
JWood19-Sep-03 5:17 
Generaladd code to standard Save Pin
doctorpi19-Sep-03 4:51
doctorpi19-Sep-03 4:51 
GeneralRe: add code to standard Save Pin
JWood19-Sep-03 5:24
JWood19-Sep-03 5:24 
GeneralRe: add code to standard Save Pin
Dangleberry19-Sep-03 5:25
sussDangleberry19-Sep-03 5:25 
GeneralRe: add code to standard Save Pin
Dangleberry19-Sep-03 5:29
sussDangleberry19-Sep-03 5: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.