?
Solved

BC4.52/Win95:  setting font type in dialog

Posted on 1997-10-01
3
Medium Priority
?
310 Views
Last Modified: 2013-12-26
I am writing a Win32 Win95 app using BC4.52, and am trying to set the font type for a dialog by using the FONT command in my resource file.  The file builds OK, but the resulting executable ends up using the system font no matter what font I select.  Is this a problem between Win95 and BC4.52?  If so, is there a work-around?
0
Comment
Question by:danbind
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:msmits
ID: 1299416
I have tried this with 5.02 and found that the fonts in the Dialog changed to what I said they should be.
Maybe you can post the resource code that you are using.

0
 
LVL 3

Accepted Solution

by:
JPM earned 400 total points
ID: 1299417
You have to making a call to GetStockObject in your Dialog SetupWindow for each new member
Example :
in SetupWindow :

TDialog::SetupWindow()
myStaticText1->SetWindowFont( (HFONT)                   GetStockObject(OEM_FIXED_FONT) , TRUE );
//  myStaticText1 was first cretad with new in Constructor
   
See OnLine Help for GetStockObject, you 'll see that Windows take SYSTEM_FONT (default value)

Hope this will help
Jean-Paul
0
 

Author Comment

by:danbind
ID: 1299418
This answer solves my problem--thanks!  BTW, the FONT parameter in the DIALOG statement DOES work (I misspoke), but is limited--the font weight defaults to "Bold".  The Borland documentation says to use the WM_SETFONT message at runtime to set the font otherwise.  Does version 5 have this limitation?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question