Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005119 [JEDI VCL] 00 JVCL Components major always 2010-01-22 21:09 2011-06-10 16:09
Reporter tetardd View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.39
Summary 0005119: TjvTreeView does not fire OnNodeCheckedChange on Windows XP
Description Hi,

TJvTreeView does not fire OnNodeCheckedChange on Windows XP SP3 latest update.

I think the bug comes from the following (see comments marked ***):

procedure TJvTreeView.CNNotify(var Msg: TWMNotify);
     *** Wrong here: it's not ComCtrls 6+, it's ComCtrls 6+ AND Vista.
         My lastest Windows XP SP3 HAS ComCtrls 6 but this notification is NOT
         sent so we still need the emulation (see below) ***
          if CheckBoxes and (GetComCtlVersion >= ComCtlVersionIE6) then
            Node := Items.GetNode(PNMTVStateImageChanging(Msg.NMHdr).hti);
          Node := GetNodeAt(Point.X, Point.Y);
          if Assigned(Node) and not MultiSelect then
            Selected := Node;

          if (Node <> nil) and (Msg.NMHdr.code = NM_RCLICK) then
            if Assigned(TJvTreeNode(Node).PopupMenu) then // Popup menu may not be assigned
              TJvTreeNode(Node).PopupMenu.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);

          *** Original code: here, XP SP3 should have this emulation performed
              but as the GetComCtlVersion < ComCtlVersionIE6 returns False in
              my XP SP3 with latest updates, the PostCheckStateChanged is not
              called ***
          if Checkboxes and (GetComCtlVersion < ComCtlVersionIE6) and (Node <> nil) and // emulate missing notify message
             (htOnStateIcon in GetHitTestInfoAt(Point.X, Point.Y)) then

          *** Modifications proposed by David Tetard ***
          if Checkboxes and ((GetComCtlVersion < ComCtlVersionIE6) Or CheckWin32Version(5))
             and (Node <> nil) and // emulate missing notify message
             (htOnStateIcon in GetHitTestInfoAt(Point.X, Point.Y)) then
Additional Information Note that this proposed fix is only for the click on the check boxes, there are other places that call PostCheckStateChanged that may need fixing too.
Tags No tags attached.
Attached Files zip file icon Bug [^] (451,505 bytes) 2010-03-13 14:07

- Relationships

-  Notes
obones (administrator)
2010-03-08 15:23

Please provide the zipped sources of a sample application showing this
tetardd (reporter)
2010-03-09 13:50

I will as soon as I can but for now, it would be faster to create your own:
1- Create ap with VCL form.
2- Add TjvTreeView to it and set to display the check boxes.
3- Add a few items in the TjvTreeView.
4- Create an OnNodeCheckedChange event that simply executes "ShowMessage('Bingo')".

Run app, tick a check box, no "Bingo" message!
tetardd (reporter)
2010-03-13 14:09

Here we go, demo included. Note that this bug seems to be dependent on the installations that took place in the OS, as described in my original post.
AHUser (developer)
2010-04-02 13:41

Fixed in SVN.

- Issue History
Date Modified Username Field Change
2010-01-22 21:09 tetardd New Issue
2010-03-08 15:23 obones Note Added: 0017239
2010-03-08 15:23 obones Status new => feedback
2010-03-09 13:50 tetardd Note Added: 0017292
2010-03-13 14:08 tetardd File Added: Bug
2010-03-13 14:09 tetardd Note Added: 0017302
2010-04-02 13:41 AHUser Note Added: 0017345
2010-04-02 13:41 AHUser Status feedback => resolved
2010-04-02 13:41 AHUser Fixed in Version => Daily / SVN
2010-04-02 13:41 AHUser Resolution open => fixed
2010-04-02 13:41 AHUser Assigned To => AHUser
2011-06-10 16:09 obones Fixed in Version Daily / SVN => 3.40

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker