Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Meet and Greet (http://www.go4expert.com/community/meet-and-greet/)
-   -   Hi friends (http://www.go4expert.com/community/hi-friends-t1394/)

rachappa 14Sep2006 12:55

Hi friends
 
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.. :)

shabbir 14Sep2006 14:03

Re: Hi friends
 
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.

rachappa 14Sep2006 15:11

Re: Hi friends
 
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..

shabbir 14Sep2006 15:16

Re: Hi friends
 
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

rachappa 14Sep2006 15:23

Re: Hi friends
 
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..

shabbir 14Sep2006 17:45

Re: Hi friends
 
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.


All times are GMT +5.5. The time now is 14:44.