 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Roland
Joined: 08 Jun 2006 Posts: 307
|
Posted: Thu Aug 24, 2006 2:03 pm Post subject: WM_GETFONT/WM_SETFONT fun (changing font for tooltips) |
|
|
Just playing around with WM_GETFONT and WM_SETFONT a little...
I have no clue how to create a font, so I let AHK do that part
| Code: | f9::
font := CreateFont("bold s50", "Matisse ITC")
Tooltip, Wow! A monster tooltip!
WinWait ahk_class tooltips_class32
SetFont("", WinExist(), font)
return
CreateFont(options="", font="") {
Loop 99 {
g = %a_index%
Gui %g%: +LastfoundExist
If ! WinExist()
break
}
Gui, %g%: +Lastfound
Gui, %g%: Font, %options%, %font%
Gui, Add, Button
SendMessage, 0x31, 0, 0, Button1 ;WM_GETFONT
Gui, %g%: Destroy
return errorLevel
}
SetFont(ctrl, win, font=0) {
SendMessage, 0x30, %font%, 1, %ctrl%, ahk_id%win%
return errorLevel
} |
|
|
| Back to top |
|
 |
robiandi
Joined: 08 Aug 2006 Posts: 49
|
Posted: Thu Aug 24, 2006 2:34 pm Post subject: |
|
|
@Roland: If your playing gives such results , please for the sake of the AutoHotkey community play very frequently |
|
| Back to top |
|
 |
ewerybody
Joined: 18 Sep 2006 Posts: 61
|
Posted: Wed Jan 19, 2011 11:44 am Post subject: |
|
|
*BUMP*!! This is great! I was just struggling with finding the solution for this!
I found Raphaels Example: and just added
SendMessage, 0x30, %aSimpleNumber%,0,, ahk_id %tThWnd1%
which already yielded "some" results ^^ but not quite with any control!
So THanks So much!!
Incredible this wasn't found by so many peeps. |
|
| Back to top |
|
 |
ewerybody
Joined: 18 Sep 2006 Posts: 61
|
Posted: Wed Jan 19, 2011 11:58 am Post subject: |
|
|
ooops! I just read the code ^^
you create a control apply the font via Gui commands and get it back with the getfont sendmessage!
however.. is there a direct way through Autohotkey? via DllCall probably? |
|
| Back to top |
|
 |
ewerybody
Joined: 18 Sep 2006 Posts: 61
|
|
| Back to top |
|
 |
poserpro
Joined: 21 Oct 2010 Posts: 438
|
Posted: Sun Jul 17, 2011 8:48 am Post subject: Re: WM_GETFONT/WM_SETFONT fun (changing font for tooltips) |
|
|
| Roland wrote: | Just playing around with WM_GETFONT and WM_SETFONT a little...
I have no clue how to create a font, so I let AHK do that part
| Code: | f9::
font := CreateFont("bold s50", "Matisse ITC")
Tooltip, Wow! A monster tooltip!
WinWait ahk_class tooltips_class32
SetFont("", WinExist(), font)
return
CreateFont(options="", font="") {
Loop 99 {
g = %a_index%
Gui %g%: +LastfoundExist
If ! WinExist()
break
}
Gui, %g%: +Lastfound
Gui, %g%: Font, %options%, %font%
Gui, Add, Button
SendMessage, 0x31, 0, 0, Button1 ;WM_GETFONT
Gui, %g%: Destroy
return errorLevel
}
SetFont(ctrl, win, font=0) {
SendMessage, 0x30, %font%, 1, %ctrl%, ahk_id%win%
return errorLevel
} |
|
This is a great function to my purpose. I was trying to blowup the font size of tooltip, and its colour. I searched and found this great tool. Curtesy to you
Just wonder how to custom the font [color=red]colour too ?[/color]
The weekend is a happy day to play with AHK
-poserpro _________________
~C'est La Vie~
I like AHK_L and Unicode
Joined : Oct 11, 2010
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|