Jump to content

TreeView Event Notification


pingpong123
 Share

Recommended Posts

Hi All,

I have created a treeview control which has checkbox and +/- button against each item. I couldn't able to find a way to know as when the user check/uncheck or click on +/- buttons of a particular tree view item.......

I am using GUIGetMsg() but it is giving the notification only when the user single click on the item but it is not giving any info when user checks the checkbox of the item....Is there any way to accomplish this task...

Any help would be highly appreciated....

Link to comment
Share on other sites

Hi,

GUIRegisterMsg() would probably be the best way to catch msgs when the tree item is clicked..

Myself I used the $WM_NOTIFY msg in combination with API Constants of TVM_HITTTEST and $TVHT_ONTITEMSTATEICON to register the Checkbox as being clicked...

Cheers

Edit: the reason I needed to know if a checkbox is being clicked is so I could set the unexpanded children to be checked or unchecked as well.

Edited by smashly
Link to comment
Share on other sites

$TVHT_ONTITEMBUTTON , use that to find if a + or - button has been hit...

$TVHT_ONTITEMSTATEICON , if a check box has been hit...

Edit: If your using the above with register msg then you'll need to declare them as a constant..

To get a great list of windows constants then have a look in the downloads section for Windows APIConstants , that someone else has already done the hard yards and put together a gui listing a majority of them to make your life easier..

Edited by smashly
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...