www.progui.co.uk  Top  Previous  Next



WindowsID = ButtonEx(WindowID.i, ButtonID.l, X.l, Y.l, Width.l, Height.l, Text$, *NormalImageID, *HotImageID, *PressedImageID, *DisabledImageID, Skin.i)


Creates a skinned ButtonEx in the specified WindowID.i.

ButtonID.l specifies the internal ID of the ButtonEx and if #ProGUI_Any is used then the returned value will be the new ButtonEx ID. X.l, Y.l, Width.l and Height.l are the position and dimensions of the ButtonEx.

Text$ is the text that will be displayed in the ButtonEx and can be an empty string.

*NormalImageID, *HotImageID, *PressedImageID and *DisabledImageID are pointers to the image data for the various states.

Skin.i specifies what skin the ButtonEx will use and can be either a handle to a skin or if zero will render the ButtonEx using the default system button skin. Please see Skin States & Properties for creating/editing ButtonEx skins.

When the ButtonEx is clicked, a #WM_COMMAND message will be posted to WindowID's message queue containing the ButtonID, which can be detected as a PureBasic #PB_Event_Menu event.


Returns the WindowsID (HWND) of the ButtonEx (or if #ProGUI_Any is used the ButtonEx ID) or zero for failure.



ButtonEx Index