1. Advanced Font Help Needed
Okay, I've read all about the AddFontResource thing in the Windows API.
I've got to call it after I've installed a font. But the documentation
doesn't tell me what DLL it's in. I also don't know how to do
SendMessage and broadcast a WM_FONTCHANGE to all the top-level windows
in the OS. So, please, can somebody give me the skeletal step-by-step?
Thanks!
2. Re: Advanced Font Help Needed
This should be simple enough to answer. If you have the handlers, you can
simply loop through them, and call SendMessage() to each handler. EG:
for x = 1 to length(wndHandles) do
void = SendMessage(wndHandles[x],WM_FONTCHANGE,0,fontHandle)
end for
If your using Win32lib, you should be able to use getHandles() to get a list
of all the controls / windows.
And AddFontResource() should be declared in user32.dll
EuMario
----- Original Message -----
From: "C. K. Lester" <euphoric at cklester.com>
To: <EUforum at topica.com>
Sent: Monday, March 22, 2004 8:54 AM
Subject: Advanced Font Help Needed
>
>
> Okay, I've read all about the AddFontResource thing in the Windows API.
> I've got to call it after I've installed a font. But the documentation
> doesn't tell me what DLL it's in. I also don't know how to do
> SendMessage and broadcast a WM_FONTCHANGE to all the top-level windows
> in the OS. So, please, can somebody give me the skeletal step-by-step?
> Thanks!
>
>
>
> For Topica's complete suite of email marketing solutions visit:
> http://www.topica.com/?p=TEXFOOTER
>
>
3. Re: Advanced Font Help Needed
Mario Steele wrote:
>This should be simple enough to answer. If you have the handlers, you can
>simply loop through them, and call SendMessage() to each handler. EG:
>for x = 1 to length(wndHandles) do
> void = SendMessage(wndHandles[x],WM_FONTCHANGE,0,fontHandle)
>end for
>
>
The docs I have for AddFontResource says you can set the hwnd parameter
to HWND_BROADCAST and that should go to all the top-level windows!
>And AddFontResource() should be declared in user32.dll
>
>
Thanks!
4. Re: Advanced Font Help Needed
----- Original Message -----
From: "C. K. Lester" <euphoric at cklester.com>
To: <EUforum at topica.com>
Subject: Advanced Font Help Needed
>
>
> Okay, I've read all about the AddFontResource thing in the Windows API.
> I've got to call it after I've installed a font. But the documentation
> doesn't tell me what DLL it's in.
GDI32.DLL
> I also don't know how to do
> SendMessage and broadcast a WM_FONTCHANGE to all the top-level windows
> in the OS.
atom Result
Result = w32Func(xSendMessage, {HWND_BROADCAST, WM_FONTCHANGE, 0, 0})
> So, please, can somebody give me the skeletal step-by-step?
> Thanks!
--
Derek