Hi Everyone,
Happy Christmas and I hope you all have a great new year!
I'm trying to get a message that appears when you have a mouse pointed to (mouse over) a simple tick box.
That is for example "Ticking this box will enable .........."
Does anyone have a simple example of how to do this?
Many thanks,
Andy.
Hi andy1966,
how about this:
autodefine "off"
DIALOG d1
CREATEDIALOG d1,0,0,300,300,@CAPTION|@SYSMENU,0,"My Dialog",&dialoghandler
CONTROL d1,@CHECKBOX,"Tick Me to close",20,10,100,20,@TABSTOP,1
'create the tool tip control
int hTooltip
hTooltip = ToolTipControl(d1,@TTS_ALWAYSTIP|@TTS_BALLOON,0)
ttAddTool hTooltip,@TTF_SUBCLASS|@TTF_IDISHWND|@TTF_CENTERTIP,GetControlHandle(d1,1),d1.hwnd,"Ticking this box will enable .........."
DOMODAL d1
END
'Our dialog subroutine
SUB dialoghandler
SELECT @MESSAGE
CASE @IDCONTROL
SELECT @CONTROLID
CASE 1
CLOSEDIALOG d1,@IDOK
ENDSELECT
'All controls should be initialized while processing the @IDINITDIALOG message
CASE @IDINITDIALOG
CENTERWINDOW d1
ENDSELECT
RETURN
ENDSUB
Thanks for a quick reply but i'm getting errors when compiling.
Undeclared function - ToolTipControl
Undefined identifier - TTS_BALLOON
and TTS_ALWAYSTIP
Syntax error - @TTF_SUBCLASS
Could someone please redo the example code as I am new to these kinds of controls, Thanks and Happy Christmas.
Andy.
What version of EBasic/IWBasic do you have?
It should have compiled just fine.
LarryMc