Hi friends

Light Poster
14Sep2006,12:55   #1
rachappa's Avatar
I am Rachappa Bandi,
I am a programmer in VC++ from 6 months.
Can Anyone help me for creating the Treeview for Registry without MFC.
waiting for reply..

With Regards
Rachappa Bandi..
Go4Expert Founder
14Sep2006,14:03   #2
shabbir's Avatar
Quote:
I am Rachappa Bandi,
I am a programmer in VC++ from 6 months.
Welcome to G4EF.
Quote:
Can Anyone help me for creating the Treeview for Registry without MFC.
You need to be using the Win32 then.
Light Poster
14Sep2006,15:11   #3
rachappa's Avatar
Hi, shabbir
I am using DEV C++ Compiler its GPL Compiler. This compiler won't support for mfc functions. so i need to write the treeview in C or C++. I am able to read the registry keys . I am struck at 3rd iteration of treeview to show the keys.., help me..
Go4Expert Founder
14Sep2006,15:16   #4
shabbir's Avatar
What API you are using to read the Registry Keys.

Probably to show the Keys you need to be using the ListView or the ListCtrl
Light Poster
14Sep2006,15:23   #5
rachappa's Avatar
Ya I am using API's from the SDK. like RegOpenKeyEx, RegQueryInfoKey, But Displaying keys in the treeview is failing.. how to handle the treectrl I am new to this one..
Go4Expert Founder
14Sep2006,17:45   #6
shabbir's Avatar
you create such controls by calling CreateWindow[Ex]() to specify their size, position, class name, styles,etc as required. For example, if you want the user to be able to tab to the window, you give it the WS_TABSTOP style (presuming the code already exists to handle the tab key). SetWindowPos() can be used to show or hide the window as well as change its position in the Z-order relative to its siblings (the other controls) living in the client area of the same window.

Now to adding a tree node and subnode use
Code:
HTREEITEM ht = treeCtrl.InsertItem("Shabbir",0,0);
treeCtrl.InsertItem("Shabbir",ht);
Remember to expand the added node to see the node.