Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   ToolTip with InstallOptions (http://forums.winamp.com/showthread.php?t=251467)

Mark Nascimento 19th July 2006 09:08

ToolTip with InstallOptions
 
I read the plugin but didn't understand.
When ..FindWindow and ..GetDialogItem... :weird:
uh,:confused:
How did he find those numbers? (#32770 and 1016)
Is it possible tooltip on buttons, text, combobox and so on?
:rolleyes:

Joel 19th July 2006 14:04

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 :D

Mark Nascimento 20th July 2006 02:07

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 20th July 2006 05:16

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 20th July 2006 12:26

Most probably you need to call ToolTips::Classic between MUI_INSTALLOPTIONS_INITDIALOG (or InstallOptions::InitDialog) and MUI_INSTALLOPTIONS_SHOW (or InstallOptions::Display).
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 20th July 2006 14:50

Quote:

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:
Quote:

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:
PHP Code:

FindWindow $"#32770" "" $HWNDPARENT
GetDlgItem 
$$0 1016 # $1 will have the HWND of the Log window (AKA Detail Window)
ToolTips::Classic $"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 20th July 2006 16:11

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 21st July 2006 03:49

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 21st July 2006 04:03

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 22nd July 2006 22:36

Quote:

Originally posted by zeeh3
Am I missing something? Thanks.
Yeah, a bug in there :D
I'll fix it today.

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

Joel needs time to be with the ladies :p


All times are GMT. The time now is 04:59.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.