Re: Change Window CE Caption Size and Font
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Wed, 26 Dec 2007 09:34:33 -0700
Captions are drawn by code in the GDI segment of the operating system. You
can't choose how to draw them, as you can on the desktop by handling the
non-client messages. As I recall, the application font is used to draw the
caption and you can change that globally for the whole device and every
program running on it, but you can't change it just for one window.
You'll have to convince me that there's a good reason to do that, too. That
seems like a really, really bad idea, unless you are the device OEM.
Paul T.
"fred_d" <duchassin@xxxxxxxxx> wrote in message
news:fktu6j$6g4$1@xxxxxxxxxxxxxxxxxxxxx
In my application, i create a main window and when i would create a
listbox , i create a child window and it's this caption that i would
change font.
In fact i would change my window Caption font (WS_CAPTION option in
createwindowEx).
What you told me is about changing all window font except the caption.
So i just would change the caption font , size of a window ...
Sorry if my explanation are quite bad.
Thanks for your help.
"fred_d" <duchassin@xxxxxxxxx> a écrit dans le message de news:
fkt221$r27$1@xxxxxxxxxxxxxxxxxxxxx
Thanks a lot.
It's working now.
I've made a mistake in sendmessage function.
Thanks
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> a écrit dans le message de news:
eMRvZiyQIHA.2000@xxxxxxxxxxxxxxxxxxxxxxx
Your use of the word "caption" is confusing me. You can change the font
used by a CONTROL, by sending it WM_SETFONT:
-----
// Try to set the font for the listbox to something else.
LOGFONT lf;
HDC hDC = GetDC( hDlg );
lf.lfHeight = -(int)MulDiv(18, GetDeviceCaps(hDC, LOGPIXELSY), 72);
ReleaseDC( hDlg, hDC );
lf.lfWidth = 0;
lf.lfEscapement = 0;
lf.lfOrientation = 0;
lf.lfWeight = FW_NORMAL;
lf.lfItalic = FALSE;
lf.lfUnderline = FALSE;
lf.lfStrikeOut = FALSE;
lf.lfCharSet = ANSI_CHARSET;
lf.lfOutPrecision = OUT_DEFAULT_PRECIS;
lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf.lfQuality = DEFAULT_QUALITY;
lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
_tcscpy( lf.lfFaceName, _T( "Tahoma" ) );
HFONT hfont = CreateFontIndirect( &lf );
SendMessage( GetDlgItem( hDlg, IDC_SHARELIST ), WM_SETFONT,
(WPARAM)hfont, MAKELPARAM( TRUE, 0 ) );
-----
There's no "caption" involved in *any* listbox, so I don't know what you
mean by that, but the text inside the listbox is written using the font
set as above.
Paul T.
"fred_d" <duchassin@xxxxxxxxx> wrote in message
news:fke3um$5rv$1@xxxxxxxxxxxxxxxxxxxxx
No excuse me.
I'm making an application and i just want to change the Caption style.
It's only for may application. I use the caption property of my listbox
window and i would change the size of title.
Thanks
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> a écrit dans le message de news:
er3zy4xQIHA.748@xxxxxxxxxxxxxxxxxxxxxxx
You're talking about a top-level window? You could change the system
font, I guess, but, no, there's not a reasonable way to change the
method of display of just *one* top-level window to center the title
on the title bar, change the font, etc.
Paul T.
"fred_d" <duchassin@xxxxxxxxx> wrote in message
news:fke0mv$4ca$2@xxxxxxxxxxxxxxxxxxxxx
Hi,
I'm working with EVC and Win CE 5.
I create a list box in a window and i would change the caption style.
Is it possible to change the caption font size of a window, to change
the font , or to center the caption in the window ?
Thanks a lot.
.
- Follow-Ups:
- Re: Change Window CE Caption Size and Font
- From: fred_d
- Re: Change Window CE Caption Size and Font
- References:
- Change Window CE Caption Size and Font
- From: fred_d
- Re: Change Window CE Caption Size and Font
- From: Paul G. Tobey [eMVP]
- Re: Change Window CE Caption Size and Font
- From: fred_d
- Re: Change Window CE Caption Size and Font
- From: Paul G. Tobey [eMVP]
- Re: Change Window CE Caption Size and Font
- From: fred_d
- Re: Change Window CE Caption Size and Font
- From: fred_d
- Change Window CE Caption Size and Font
- Prev by Date: Re: Change Window CE Caption Size and Font
- Next by Date: Re: Change Window CE Caption Size and Font
- Previous by thread: Re: Change Window CE Caption Size and Font
- Next by thread: Re: Change Window CE Caption Size and Font
- Index(es):
Relevant Pages
|
Loading