Re: Change Window CE Caption Size and Font



I still don't understand the 'why' of this. Draw us a picture or take a
screen shot with the Remote Spy application and tell us *what* you are
trying to accomplish. Why would you want your listview, which is a control
and *ALWAYS* a child window of another window, to have a caption? If you
just want to label a control, wouldn't a static text control be the correct
way? In other words, wouldn't you do it the same way that *EVERY*
application in Windows does it?

Paul T.

"fred_d" <duchassin@xxxxxxxxx> wrote in message
news:fkvju1$s2m$1@xxxxxxxxxxxxxxxxxxxxx
OK. I'm making an application with a listview control style.
Do you know how can i draw this control IN my main window. For the moment,
i make a new window with a caption (createwindowEx with WS_CAPTION) . My
application is dedicated to handled device so with a little screen. I had
to use a big font (height = 24) everywhere.

The caption in my listview window seems to be 20 (height). It's not very
beautiful with my other lines which have an height of 24.

Have you got an idea please.

Thanks to help me.


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> a écrit dans le message de news:
ePhR$y9RIHA.5016@xxxxxxxxxxxxxxxxxxxxxxx
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.

















.



Relevant Pages

  • Re: Change Window CE Caption Size and Font
    ... // Try to set the font for the listbox to something else. ... I'm making an application and i just want to change the Caption style. ... window and i would change the size of title. ... DOT com> a écrit dans le message de news: ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Change Window CE Caption Size and Font
    ... 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. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Change Window CE Caption Size and Font
    ... the application font is used to draw the ... caption and you can change that globally for the whole device and every ... but you can't change it just for one window. ... // Try to set the font for the listbox to something else. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: DrawCaption()
    ... > The drawing of my caption must take place in two phases. ... > So I want to draw it in two passes. ... > not changing the clipping region at all and nothing was drawn. ... > and setting the window styles on it that I want drawn on my current dialog ...
    (microsoft.public.win32.programmer.gdi)
  • Re: WM_NCACTIVATE on Dialogs
    ... >> draw the caption, and I am traying to skin the caption, so, calling ... Set the window style to WS_POPUP and don't include a caption. ... in turn will trigger the Windows to draw the caption, ... On user registred classes nothing of this ...
    (microsoft.public.win32.programmer.ui)