OmYcroN Posted February 1, 2012 Share Posted February 1, 2012 (edited) Hello. I have a treeview and items added with _GUICtrlTreeView_AddChild() and their handles stored into an array. If I use the code below it will always run the function but i want to use Function() only when clicking the item. I've used $arrGuiMsg[2] <> 0x000000 but with no luck. So the problem is what happens when an item is clicked in this situation ? How can i handle it ? Global $arrGuiMsg While True $arrGuiMsg = GUIGetMsg(1) Switch $arrGuiMsg[1] Case $window Switch $arrGuiMsg[0] EndSwitch Switch $arrGuiMsg[2] Case $arrItemHandles[0][0] To $arrItemHandles[Ubound($arrItemHandles) - 1][0] If $arrGuiMsg[2] <> 0x000000 Then Function() Endif EndSwitch EndSwitch WEnd Edited February 1, 2012 by OmYcroN Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 1, 2012 Share Posted February 1, 2012 GUIGetMsg() works with control id's as used by the internal GUICtrl* functions. Look at the example for _GUICtrlTreeView_Create() for how to react to clicks .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
OmYcroN Posted February 2, 2012 Author Share Posted February 2, 2012 I've looked at WM_NOTIFY but I can't fint the correct case for checking/unchecking a checkbox. $NM_CLICK gets all clicks within the treeview. It there is other example on this matter please direct me. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now