programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: fonts for listbox

From: Anil Rodrigues <arodrix_at_weld.com>
Date: Tue, 5 Dec 2006 13:18:35 -0500

Thanks Mike,
That seems to work just fine:
-----------------------------------------------------------
 : setfnt hlst WM_SETFONT ANSI_VAR_FONT GetStockObject
                             FALSE SendMessage DROP ;
 [+SWITCH TopMESSAGES ( msg -- res )
   WM_CREATE RUN: DWinCREATE LWinCREATE setfnt 0 ;
   WM_SIZE RUNS ldsize
 SWITCH]
-----------------------------------------------------------
I looked at WM_SETFONT, wasn't sure how to use it; I've usually
seen WM_---- messages only in a [SWITCH statement.

Size is just right, but how would one set font size?

Thanks and Cheers!
Anil

-----Original Message-----
From: Mike Ghan [mailto:MikeGhan_at_logix-controls.com]
Sent: Tuesday, December 05, 2006 12:00 PM
To: sftalk_at_forth.com
Subject: [sftalk] Re: fonts for listbox

1. Try sending the control a WM_SETFONT message:

  hControl WM_SETFONT hFont FALSE SendMessage DROP

2. A SwiftForth dialog creates a standard Windows dialog template
(structure) in memory which contains the name and size of the font.
Windows creates the font when the dialog is invoked.

HTH
Mike

-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf
Of Anil Rodrigues
Sent: Tuesday, December 05, 2006 8:39 AM
To: sftalk_at_forth.com
Subject: [sftalk] fonts for listbox

1. I want to set the font in a listbox that is a child window, not in a
Dialog box.
Trying to use GetStockObject, SelectObject, with the fonts listed in the
API ( ANSI_VAR_FONT) etc doesn't get me anywhere.
Suggestions welcome.

2. When a Dialog box uses
   (Font 8, Ms Sans Serif)
 is this a stock font or is it being created by SF ?

Thanks,
Anil
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Tue Dec 05 2006 - 10:19:17 PST

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:41 PST