Hi friends

rachappa's Avatar
Light Poster
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..
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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.
0
rachappa's Avatar
Light Poster
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..
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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
0
rachappa's Avatar
Light Poster
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..
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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.