Jump to content
Sign in to follow this  

_GUICtrlButton_Create & GUICtrlSetTip

Recommended Posts



I'm lost....

I created some buttons with

to have a button with a bitmap.

But now I wanted to add tips, and GUICtrlSetTip does not work (at least in the example of the help file)

$btn = _GUICtrlButton_Create($hGUI, "Button1", 10, 10, 90, 50)

I found some posts about "GUICtrlSetTip does not return ID", so I thought maybe with WM_NOTIFY but...

Let me explain want I search:

In case the mouse is over a button control created with _GUICtrlButton_Create I want to display at the control a sort of TIP/ToolTip/help line as long as the mouse is over the control/button.

I need a helping hand to point to the right way (posting?)

It makes me crazy because I know the solution is right in front of me, but I'm too blind... :)

(Or did I missed a thing about the GUICtrlSetTip?)

Share this post

Link to post
Share on other sites


GUICtrlSetTip requires a ControlID as the ID parameter - this is returned by the native GUICtrlCreate* functions.

Creating a control with a UDF (using the _GUICtrl*_Create functions) returns a handle - which means that you cannot use this value in GUICtrlSetTip. :)

You say you created the button with the UDF to display a bitmap - you can show bitmaps on the natively-created buttons, which would solve your problem in one fell swoop. Why did you feel you needed UDF-created buttons? :)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites


$MAIN = GUICreate("Example")
$BUTTON = GUICtrlCreateButton("",150,150,50,50,0x0080)  ; $BS_BITMAP = 0x0080
GUICtrlSetImage($BUTTON,@WindowsDir & "\Coffee Bean.bmp")
GUICtrlSetTip($BUTTON,"Cofee Bean")

While True
    Switch GUIGetMsg()
        Case -3

When the words fail... music speaks

Share this post

Link to post
Share on other sites

Thank you, both.

To be honest...why creating with the UDF?......ahhhh re-used some old code :) where I used once the $BS_BITMAP

:P mmmh must be really dumb looking, didn't it? Maybe I should stop coding and go to bed to heal my flu.... :)

Share this post

Link to post
Share on other sites

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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.