Jump to content

TreeView


regi
 Share

Recommended Posts

Hullo,

I've created a nice dynamic treeview, with a right-click menu, but I've noticed a curious behavior which I'm hoping there is a solution to...

In this screen-shot:

Posted Image

Am I correct in believing Item 1 is 'Selected' and Item 2 is 'Focused'?

My right-click menu obviously acts upon the item right-clicked, which as you can see, is not always the same as the item dot-framed (item 1).

I'm therefore unable to perform actions on Item 2, how would I obtain a handle to this apparently 'Focused' but not 'Selected' Item, so I can set the 'selection' or at least perform my actions on the right-clicked item?

Hoping there's some smarties out there :D

Link to comment
Share on other sites

What method did you use to detect the right-click of an item? If you trapped a WM_COMMAND or WM_NOTIFY message, the handle of the item is in the message.

Can you post a short demo of your GUI and right-click detection?

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I am using WM_NOTIFY.

Think I just needed to step away from the computer for a while...

The problem was the richt-click location not being detected properly (poor error checking on my part). Long of the short is, I ended up utilizing _GUICtrlTreeView_HitTestItem().

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...