![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Game engine designer
Join Date: May 2005
Location: Sweden
Posts: 301
Rep Power: 4
![]() |
[WIN32 API] GUI widgets font size
How do I set what font should be used in GUI controls created using the CreateWindow function?
![]() Thanks for your help! /Klarre
__________________
http://www.klarre.se |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3
![]() |
Hi Klarre, this is not exactly an answer to your question, but if you want to use controls it's recommended to use them with a Dialog window. That way you'll not only get the correct fonts but also other things that Windows handles automatically such as being able to cycle through the controls by pressing tab.
__________________
Visit my website BinaryNotions. |
|
|
|
|
|
#3 |
|
Professional Programmer
|
I've always used something like this to get my font un-nasty:
HWND hWnd = GetDlgItem( hWndButton, "BUTTON" ); HFONT hFont = GetStockObject( DEFAULT_GUI_FONT ); SendMessage( hWndButton, WM_SETFONT, (WPARAM)hFont, TRUE ); Is that what you were looking for?
__________________
The world's first athletic computer geek! The home of PrProgramsStudios How not to post a question: <-- Please don't reply |
|
|
|
|
|
#4 |
|
Game engine designer
Join Date: May 2005
Location: Sweden
Posts: 301
Rep Power: 4
![]() |
Thanks Prm753! Works great!
Eoin, I will check out the dialog window thing. Thanks for the tip! /Klarre
__________________
http://www.klarre.se |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My first WIN32 API application | ivan | Show Off Your Open Source Projects | 27 | Jan 6th, 2006 5:04 PM |
| Button font size programmatically??? | myName | C# | 3 | Nov 8th, 2005 1:46 AM |
| colors. fonts and font size inside the table ?_? | cloud- | HTML / XHTML / CSS | 2 | Mar 12th, 2005 3:10 PM |