Read this in other languages: Russian.
Pages:
Versions
Functions
About versions
- Does not use/require third-party libraries. Written with built-in AHK functions
- There are flickers when you change the picture(that is, when you hover/when you press / when you disable / enable the button)
- Flicker-free
- When creating - > ability to set the image as Bitmap, and the path to the image
- When deleting - > ability to clear Bitmap, thus free up memory, or not
- Uses GDI+ (not so scary)
-> DoubleClick by default ignored, see line:290 or(find: "NOTE:DoubleClick") in Class_PictureButton_v2.ahk
________________________________________
Description: Adding new picture button.
Args:
hwnd - owner window
options[] - options object
x - position X
y - position Y
w - width
h - height
AntiAlias - AntiAlias (default:3)
0 - Default
1 - HighSpeed
2 - HighQuality
3 - None
4 - AntiAlias
state - state of the button (default:normal)
"normal"
"hover"
"pressed"
"disable"
btn[] - button object (values can be a bitmap or path to file)
1 - "normal"
2 - "hover"
3 - "pressed"
3 - "disable"
on_click - function object (callback, use Func("FunctionName"))
Returns:
0 - there were problems
or owner window not exist
or value "options" is not object
or value "btn" is not object
N - positive number, id of created button
________________________________________
________________________________________
Description: deleting button.
Args:
id - id of the button
removeBitmap - removing a bitmap from resources (default:1)
Returns:
0 - button not exist
1 - button succesfully deleted
________________________________________
________________________________________
Description: showing button/s.
Args:
id - id of the button, or -1 - all button
state - the state of the button
1 - normal
2 - hover
3 - pressed
3 - disable
Returns:
0 - button not exist
1 - button succesfully deleted
NOTE: function returns all the time 1, if id=-1
________________________________________
________________________________________
Description: enabling button.
Args:
id - id of the button
Returns:
0 - button not exist
1 - button succesfully enabled
________________________________________
________________________________________
Description: disabling button.
Args:
id - id of the button
Returns:
0 - button not exist
1 - button succesfully enabled
________________________________________