Hello,
after some time I have a little time again for C-programming.
Congratulations Pelle, your PellesC gets always better, excellent!
Some years ago I wrote an indenting tool (an addin that I always use).
Now I have the idea, to use this code to make something like that nice code folding in PellesC IDE and like the treeviews, where you can find functions in modules, or classes in CPP modules in other IDEs.
The number of tabulators, used to indent the code, i.e.: the level of nesting, is equal to the level in a treeview.
I feed a treeview with the complete code of a source file.
Each line gets one treeview item text.
Same indent level means sibling item.
Increasing level means child item.
Decreasing level (one less tabulator) means parent item.
The fully expanded tree looks like an indented code.
A partly collapsed tree shows the main structure of a function or a long switch.
A fully collapsed tree shows the definitions and function names.
That is what I have now.
I would like to make code modification within the treeview by drag and drop, for example moving functions or loops or switches.
Or search function of a keyword with automatically expanding the tree to all the locations of the discoverd keyword at once to get a good overview of its use.
The macro:
BOOL AddIn_GetDocumentInfo(HWND hwnd, PADDIN_DOCUMENT_INFO pDocInfo);
to retrieve the filename,
seems not to work in my code.
Why?
Attached is the code and the DLL (to use as an addin in PellesC).
Holger Buick