❔ WM_FONTCHANGE
Hi, I was recommended to give WM_FONTCHANGE a try yesterday but after reading through mcs docs and watching a video I still have no idea how I'd implement this.
https://learn.microsoft.com/en-us/windows/win32/gdi/wm-fontchange
https://learn.microsoft.com/en-us/previous-versions/dd398104(v=vs.100)
I tried implementing it by pasting somebody else's code but I've failed even at that:
https://stackoverflow.com/questions/19453516/c-sharp-font-able-to-be-used-after-loading
I couldn't find where they declared and assigned to
HWND_BROADCAST
so I passed IntPtr.Zero like I've seen in a youtube video(although it was not related to this function).
I am not getting any errors but when I MB.Show(msg.ToString())
it shows 0 and my font isn't updated.
There is a possibility that this function is not working but I don't have an idea how I'd test it.WM_FONTCHANGE message (Winuser.h) - Win32 apps
An application sends the WM_FONTCHANGE message to all top-level windows in the system after changing the pool of font resources.
Stack Overflow
C# font able to be used after loading
I figures out how to load a PS font from C# app, it shows up and is useable in all the app on my system like word, notepad etc. except in my c# app (and of course this is where I needed it).
I ne...
2 Replies
please @ me if you are able to help
ok, I've got the whole code completed but it doesn't seem to be working:
Even after changing the font it stays the same, my approach is working 100% because once I restart the computer or log out and back in it's changed, it's something to do with this if it's what I needed in the first place.
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.