camelord
camelord

Reputation: 285

Why am I not getting events for a checkbox click in a treeview control?

In my MFC dialog, i have a tree view control with checkboxes. Clicking the checkbox does not raise the NM_CLICK nor the TVN_SELCHANGED events, which I had hoped it would do.

How do I correctly determine when a checkbox is checked/unchecked in a tree view control?

Upvotes: 2

Views: 2246

Answers (2)

dwo
dwo

Reputation: 3636

There is no notification of the click.

You'll find more information and a workaround here: http://support.microsoft.com/?scid=kb%3Ben-us%3B261289&x=19&y=11

Upvotes: 1

mmonem
mmonem

Reputation: 2831

Handle mouse click normally and in the handler identify the current item and then use TreeView_GetCheckState to get its checked state.

Upvotes: 1

Related Questions