๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10943

Re: Fontsettings

#10943
From: Bob Gonder
Date: Sat, 06 Mar 2004 17:32
20 lines
1394 bytes
Johan Elms๏ฟฝter wrote:

>Now I wonder how I set the fontsize for the text drawn with textout and the
>text added in the listbox.
>
>Does anyone know?

/* Get a handle to the new font */
hFont = CreateFont(whatever);

/* Select the new font (returns the font that was in use) */
hOldFont = SelectObject(hDC,hFont);

TextOut(whatever);

/* restore original font */
SelectObject(hDC,hOldFont);

/* Release our new font */
DeleteObject(hFont);
Technical Details
Message-ID: <fa2k40hcj1n83fqpcjp9mgnf5l2ue2tnsa@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4049d1af@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,d1297fa599b5b2a3
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-06 09:39:44 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Fontsettings
Date: Sat, 06 Mar 2004 09:32:33 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <fa2k40hcj1n83fqpcjp9mgnf5l2ue2tnsa@4ax.com>
References: <4049d1af@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 67.31.176.63
X-Trace: newsgroups.borland.com 1078594354 67.31.176.63 (6 Mar 2004 09:32:34 -0800)
Lines: 21
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail