Jump to content

Recommended Posts

Posted (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 by WildByDesign
Posted

Have you tried to run the helpfile example, topic _GUICtrlButton_GetImageList, replacing twice GUICtrlCreateButton with GUICtrlCreateCheckBox in the code ?

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted

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.

Posted
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."

Posted (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 by WildByDesign

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...