Skip to main content
gamedev.net
🔒 Locked

win programming - all text bold?

Started by keethrus 3 replies 700+ views
Original Post
keethrus
keethrus
ive been programming for years, but just recently ive been delving into windows programming. for some reason all the text in my program ( besides the menu text ) is bold. text in a listbox, inside a button, a static label - they''re all bold - and it looks ugly. is there anyway to make them just plain ''o font? - jeremiah inlovewithGod.com
SimDemon
SimDemon
Try using the SendMessage(...) function with WM_SETFONT.


SendMessage(hControlWnd, WM_SETFONT, (WPARAM) DEFAULT_GUI_FONT, (LPARAM) 0);


I think that should fix the problem. "hControlWnd" is the handle (HWND) to the control (listbox, button, etc.) of the window to set the font.
I'll have a link to the TriFaze website as soon as possible. It's still currently being designed, by myself of course! =) I'll update the URL and my signature as soon as possible.Feel free to send me a message on Yahoo! or AOL IM™. =)
keethrus
keethrus
Nope, that doesnt work. any other ideas? any idea *why* everything is bold? the text in messageboxes are not bold, but all my dialog boxes and controls in the main window (minus menu) are bold. it''s weird to me.

- jeremiah

inlovewithGod.com
Endurion
Endurion
It''s


SendMessage(hControlWnd, WM_SETFONT, (WPARAM)GetStockObject( DEFAULT_GUI_FONT ), (LPARAM) 0);

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>
SimDemon
SimDemon
I forgot the "GetStockObject()" part. Sorry! LoL. I knew that. =P
I'll have a link to the TriFaze website as soon as possible. It's still currently being designed, by myself of course! =) I'll update the URL and my signature as soon as possible.Feel free to send me a message on Yahoo! or AOL IM™. =)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.