In EVC 3/4 how do you change the font/weight etc of the edit control ?

I've done an approx screen layout in EVB and now need to code it in EVC

Is it something like ... will use the 'currently selected' font ?? like
textout does ?

TIA

Andrew Kennard

Re: evc 3/4 and edit control fonts by Norman

Norman
Fri Jan 02 19:18:09 CST 2004

Andrew Kennard wrote:
> In EVC 3/4 how do you change the font/weight etc of the edit control ?
>
> I've done an approx screen layout in EVB and now need to code it in EVC
>
> Is it something like ... will use the 'currently selected' font ?? like
> textout does ?
>
> TIA
>
> Andrew Kennard
>
>
The EDIT control, like other built-in and common controls, uses whatever
font it is given via the WM_SETFONT message.

Dialogs will send the font handle created from the FONT statement in the
dialog resource to all controls in the dialog.

Norm


Re: evc 3/4 and edit control fonts by r_z_aret

r_z_aret
Sat Jan 03 15:22:42 CST 2004

On Fri, 2 Jan 2004 17:34:20 -0000, "Andrew Kennard"
<a.kennard@btinternet.com> wrote:

>In EVC 3/4 how do you change the font/weight etc of the edit control ?

I create a font, and then send a WM_SETFONT message. A big "trick" is
to make sure the font handle remains valid as long as the control is
being used (so it is valid whenever the control's text is redrawn).

You might find useful info in a 14 Oct 03 thread called "Setting
height of single line edit box" in
microsoft.public.win32.programmer.ui. One of my contributions includes
a function to create a font based on height (to match height of edit
box). I use the same function for CE and "big" Windows.

>
>I've done an approx screen layout in EVB and now need to code it in EVC
>
>Is it something like ... will use the 'currently selected' font ?? like
>textout does ?
>
>TIA
>
>Andrew Kennard
>
>

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret
PenFact, Inc.
500 Harrison Ave., Suite 3R
Boston, MA 02118
www.penfact.com