🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #18

Re: dialog boxes

#18
From: Tom W. Brown
Date: Tue, 27 Oct 1992 21:03
34 lines
1891 bytes
In article <1992Oct26.154111.19985@seq.uncwil.edu>, ryals@seq.uncwil.edu (Robert Ryals) writes:
|> I need to create a listbox with 2 columns that contain a code along with it's
|> description in column 2 - how can I ensure that column 2 always lines up
|> correctly ?

Here are two ways:

1. Tell the listbox to use a fixed pitch font and use spaces to align your
   columns in the listbox text.  See below for how to tell a control to use
   a specific font.

2. Use the LBS_USETABSTOPS style for the listbox, use tabs to do column
   alignment and use the LB_SETTABSTOPS message to tell the listbox where
   to put the tab stop.


|> 
|> Also,  is there a way that I can change the font for a single edit control
|> within a dialog box without changing everything within the dialog ?

Send the WM_SETFONT message to the control with the handle of the desired
font as wParam -- for example, to set a control (IDLIST) to use the system
fixed pitch font do the following:

   SendDlgItemMessage(hDlg, IDLIST, WM_SETFONT,
                      (WPARAM) GetStockObject(SYSTEM_FIXED_FONT),
                      0L);


----------------------------------------------------------------------------
Tom Brown               |  "Strange women, lying in ponds, distributing
PE Nelson Systems       |   swords is no basis for a system of government."
twbrown@pe-nelson.com   |                    Monty Python and the Holy Grail
----------------------------------------------------------------------------
Technical Details
Message-ID: <666@lax.lax.pe-nelson.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrown
References: <1992Oct26.154111.19985@seq.uncwil.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrown
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: dialog boxes
Message-ID: <666@lax.lax.pe-nelson.com>
Date: 27 Oct 92 21:03:02 GMT
References: <1992Oct26.154111.19985@seq.uncwil.edu>
Sender: news@lax.pe-nelson.com
Organization: PE-Nelson
Lines: 34