Skip to content
⌘ NSIS Forum Archive

ToolTip with InstallOptions

10 posts

Mark Nascimento#

ToolTip with InstallOptions

I read the plugin but didn't understand.
When ..FindWindow and ..GetDialogItem... 🤪
uh,😕
How did he find those numbers? (#32770 and 1016)
Is it possible tooltip on buttons, text, combobox and so on?
🙄
Joel#
1) Did you read the docs about those "numbers"?
2) Yes, is possible to add toottips to the common controls, just read the docs and follow the examples 😁
Mark Nascimento#
I read but there is nothing about them. There is only one example an no explanation. I,m talking about ToolTips.zip, NSIS plugin. Where are these docs ?
Mark Nascimento#
I discovered this, but only works after pressin or marking a box, it means, after an "abort" in Function LeaveCustom.

Function LeaveCustom
ReadINIStr $1 "$exedir\m.ini" "Field 2" "HWND"
ToolTips::Classic $1 "Tip" 0x00ffbbbb 0x00111111 "font"

And, before touching anything ?
Afrow UK#
Most probably you need to call ToolTips::Classic between MUI_INSTALLOPTIONS_INITDIALOG (or InstallOptions::InitDialog) and MUI_INSTALLOPTIONS_SHOW (or InstallOptions:😁isplay).
You also need to get the HWND of the control using GetDlgItem rather than reading from the INI file. The control ID will be 1200 + field num - 1.

-Stu
Joel#
Originally posted by Mark Nascimento
I discovered this, but only works after pressin or marking a box, it means, after an "abort" in Function LeaveCustom.

Function LeaveCustom
ReadINIStr $1 "$exedir\m.ini" "Field 2" "HWND"
ToolTips::Classic $1 "Tip" 0x00ffbbbb 0x00111111 "font"

And, before touching anything ?
lolz 🙂

Let's start:
From the tooltips readme doc:
Syntax:
a) Classic
ToolTips::Classic hwndControl "Tooltip_body" "color_of_the_text_in_0xRRGGBB" "color_of_the_background_in_0xRRGGBB" "font_face" "font_size_px"
See example "ToolTips_Classic.nsi"
And now, let's see the example the example:
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1016 # $1 will have the HWND of the Log window (AKA Detail Window)
ToolTips::Classic $1 "Here you can view the installation details....!" 0x00FF0000 0x00FFFFFF "Comic Sans Ms" 10 
obviously, you MUST read the docs about FindWindow & GetDlgItem if you don't know what does params are.
In this case 1016 is the control ID, taken from an external app, such as resource hacker.
zeeh3#
Joel, the last param (font_size_px) does not make any difference in the font if I change it to 36, 100 or even 900. Am I missing something? Thanks.
Mark Nascimento#
Thanks for patience but:
I downloaded Tooltips.zip but there is no *.doc inside.
The two micro examples and the micro txt are not illuminatives.
Where each command go? (function, section, wich?)
Where goes ToolTips::Classic hwndControl "Tooltip_body"...?
Thanks tip resource tuner. Ok.
I,ve read FindWindow & GetDlgItem about 1000 times last 3 years but never could make it work or I never understood. Still don,t.
Font: Works, but the smallest size is still too big (no problem).
Always classic, never Modern UI.
Mark Nascimento#
OK FINISH !!!
There it goes:
Function ShowCustom
InstallOptions::initDialog /NOUNLOAD "$exedir\m.ini"
Pop $hwnd
FindWindow $3 "#32770" "" $HWNDPARENT
GetDlgItem $1 $3 1201 ;Field 2 here
ToolTips::Classic $1 "Tip.." 0x00ffeeee "0x00000000" system
InstallOptions::show
Pop $0
FunctionEnd

Thanks Afrow UK
Thanks Joel
Joel#
Originally posted by zeeh3
Am I missing something? Thanks.
Yeah, a bug in there 😁
I'll fix it today.

Sorry, for the delay, I was out of my PC.

Joel needs time to be with the ladies 😛