WildByDesign Posted February 22 Posted February 22 (edited) I am trying to obtain an ImageList for a checkbox created with GUICtrlCreateCheckbox. I’ve tried using _GUICtrlButton_GetImageList but it is failing to obtain a handle. Unfortunately there is no past mention of that function being used in this forum so I only have the help topic function to go by. Does anyone know a way to get the ImageList handle from a checkbox? EDIT: To be more specific, I am hoping to get the state icons ImageList of the checkbox. Eg. Checked, unchecked. Thank you. Edited February 22 by WildByDesign
pixelsearch Posted February 22 Posted February 22 Have you tried to run the helpfile example, topic _GUICtrlButton_GetImageList, replacing twice GUICtrlCreateButton with GUICtrlCreateCheckBox in the code ? WildByDesign 1 "I think you are searching a bug where there is no bug... don't listen to bad advice."
WildByDesign Posted February 22 Author Posted February 22 No, I didn’t try to swap it directly in the help file example. That is a great idea. I’ll try it within the next hour and get back to you on that.
WildByDesign Posted February 22 Author Posted February 22 From what I can tell, the Example 2 does not even use the function from the actual help topic. And Example 1 does not work at all. The MemoWrite does not output or write anything. It seems to be a broken function. And that is the default examples as they are without modifying them. By the way, I should be more specific. I am looking for the state icons from the checkbox ImageList. I'll keep digging into this and see if I can get the handle another way.
pixelsearch Posted February 22 Posted February 22 Just now, WildByDesign said: Example 1 does not work at all. The MemoWrite does not output or write anything. It sure has something to do with #include "Extras\HelpFileInternals.au3" found in AutoIt 3.3.18.0 examples. This kind of line didn't exist in AutoIt 3.3.16.1 (which is the version I used running example1, grabbing the code from AutoIt help file 3.3.16.1, with Memowrite filled with plenty of infos) "I think you are searching a bug where there is no bug... don't listen to bad advice."
WildByDesign Posted February 22 Author Posted February 22 (edited) 48 minutes ago, pixelsearch said: It sure has something to do with #include "Extras\HelpFileInternals.au3" found in AutoIt 3.3.18.0 examples. This kind of line didn't exist in AutoIt 3.3.16.1 (which is the version I used running example1, grabbing the code from AutoIt help file 3.3.16.1, with Memowrite filled with plenty of infos) You are right. I just tested the older help examples as well and it worked here too. But I don't think it's just the HelpFileInternals.au3 part because it seems like the function also used to work but doesn't work anymore. EDIT: Actually the function has not changed. Edited February 22 by WildByDesign
WildByDesign Posted February 22 Author Posted February 22 It seems that I may be out of luck on this one. It seems that checkboxes don't have a state imagelist similar to how ListView and TreeView checkboxes.
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