News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Treeview - state change for checkbox

Started by georgek01, May 14, 2007, 05:39:59 AM

Previous topic - Next topic

georgek01

Hello!

Is there a notification message that is sent when the state (checkbox) of a treeview item changes.

As an example below, I get several notification events from the treeview control, but I'm unable to find a corresponding notification for state change.


...

.if wParam == IDC_TREE 
  mov eax, lParam
  mov ecx, (NM_TREEVIEW ptr [eax]).hdr.code
  .if ecx == TVN_SELCHANGED
     ...

  .elseif ecx == TVN_STATECHANGED ---- ?
   ...



What I'm currently doing is to iterate all nodes in the tree after a NM_CLICK notification is received and checking the state of each, but this is unnecessary if there is a notification specific to state changes.

Any assistance will be greatly appreciated.
What we have to learn to do, we learn by doing.

- ARISTOTLE (384-322 BC)

zooba

You can do a hit-test when you receive a NM_CLICK message. There's examples either in MSDN or a KB article, just Google for it. Microsoft have basically admitted that it was an oversight.

Cheers,

Zooba :U

georgek01

What we have to learn to do, we learn by doing.

- ARISTOTLE (384-322 BC)