Article View: borland.public.cppbuilder.nativeapi
Article #8524Re: Load font from resource
From: Bob Gonder
Date: Wed, 20 Oct 2004 18:23
Date: Wed, 20 Oct 2004 18:23
18 lines
1684 bytes
1684 bytes
PaoloItaly wrote: >I've the following code > HRSRC h = FindResource(NULL, "LADDERFONT", "RT_FONT"); > HGLOBAL hg; > if (h) > hg = LoadResource(NULL, h); >but how can use it ? >How i can obtain an HFONT Please see "Font Installation and Deletion" in the WIN32.HLP (and the several pages after that) To paraphrase: Fonts must be installed in the system before they can be used. That means you need to "install" your resource font (AddFontResource). Then you can use CreateFont() to load that font from the system, and use it.
Technical Details
Message-ID:
<6padn0lpe0t995pn2375f26pb7sh4bp2d5@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!news-peer-test!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4176068a$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,15bb0ddfaf3b41c0 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Load font from resource Date: Wed, 20 Oct 2004 11:23:21 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <6padn0lpe0t995pn2375f26pb7sh4bp2d5@4ax.com> References: <4176068a$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.91.155 X-Trace: newsgroups.borland.com 1098296597 69.69.91.155 (20 Oct 2004 11:23:17 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!news-peer-test!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail