Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > openwatcom.users.c_cpp > #3472

Re: How do I change the size and font of text output by textout?

From David Ogilvie <d2ogilvi@sympatico.ca>
Newsgroups openwatcom.users.c_cpp
Subject Re: How do I change the size and font of text output by textout?
Date 2016-01-02 11:12 -0500
Organization OpenWatcom
Message-ID <n69lm7$fkq$1@www.openwatcom.org> (permalink)
References <n557f3$ov$1@www.openwatcom.org> <n5a63i$5ik$1@www.openwatcom.org> <n5dcrc$89k$1@www.openwatcom.org> <n5erkv$h55$1@www.openwatcom.org> <n5g420$9aj$1@www.openwatcom.org>

Show all headers | View raw


I found what I needed in chapter 17 of Petzold's 
"programming Windows, 5th edition".  I had an 
earlier version of the book which did not include 
the EZTest/EZFont demo of chapter 17.  This shows 
that TextOut will react to font changes passed to 
the current Window.

On 12/23/2015 6:35 PM, David Ogilvie wrote:
> My profession was DOS programming for about 15
> years, and I have Petzold's book "Programming
> Windows 95", so agree with you completely.
> Petzold's website had downloads of the examples
> from some of his books, which I've been looking
> at, but a lot of stuff now seems to be in C++ or
> C#, (which I really never got a handle with
> <groan>), while most of my programming was in C,
> Pascal, Cobol, Fortran, et al.  <grin>
>
> I admit that this is probably not strictly
> on-topic for this list, but at least I can say
> that the only compiler tools I've used since I
> attended Waterloo have been the Waterloo-based
> compilers (starting with WATIAC, WATMAP, WATFOR
> and WATFIV).  Yeah, that was a looong time ago!  :)
>
> David O
>
> On 12/23/2015 7:05 AM, Hans-Bernhard Bröker wrote:
>> Am 22.12.2015 um 23:47 schrieb David Ogilvie:
>>> It's the Windows API one that I was trying to
>>> use, and was looking at
>>> the M$ documentation.  I'm sure there must be a
>>> way to output text of
>>> different sizes, but they sure don't make it
>>> obvious how to do it!  <grin>
>>
>> The API documentation is really meant more for
>> reference, not as learning material for newbies.
>> Windows programming is complex enough that you
>> really need some coherent explanation of it all.
>> Generations of budding Windows programmers have
>> all learned from various updated versions of the
>> same book: "Programming Windows" by Charles
>> Petzold.
>>
>> As to the problem at hand: TextOut() has five
>> arguments.  Four of them are pretty
>> self-explanatory.  The clue must thus be in the
>> remaining one: the HDC, or "handle to a device
>> context".  You'll want to find out where to get
>> that from, and what other functions use this kind
>> of argument, particular those that deal with fonts.

Back to openwatcom.users.c_cpp | Previous | NextPrevious in thread | Find similar


Thread

How do I change the size and font of text output by textout? David Ogilvie <d2ogilvi@sympatico.ca> - 2015-12-19 15:25 -0500
  Re: How do I change the size and font of text output by textout? Johann Klammer <klammerj@a1.net> - 2015-12-21 03:44 +0100
    Re: How do I change the size and font of text output by textout? Johann Klammer <klammerj@a1.net> - 2015-12-21 18:25 +0100
  Re: How do I change the size and font of text output by textout? Hans-Bernhard Bröker <broeker@physik.rwth-aachen.de> - 2015-12-21 18:33 +0100
    Re: How do I change the size and font of text output by textout? David Ogilvie <d2ogilvi@sympatico.ca> - 2015-12-22 17:47 -0500
      Re: How do I change the size and font of text output by textout? Hans-Bernhard Bröker <broeker@physik.rwth-aachen.de> - 2015-12-23 13:05 +0100
        Re: How do I change the size and font of text output by textout? David Ogilvie <d2ogilvi@sympatico.ca> - 2015-12-23 18:35 -0500
          Re: How do I change the size and font of text output by textout? David Ogilvie <d2ogilvi@sympatico.ca> - 2016-01-02 11:12 -0500

csiph-web