From: Sunny on
Let 's talk about how to custom draw a window caption bar,any one
interesting?

1. we know that we can custom draw a window caption in OnNcPaint
2. we also can custom the caption's height in OnNcCalcSize

But if the window has a menu then i do not know how to draw.


From: Ajay Kalra on
On Jan 7, 2:57 am, "Sunny" <sound_of_nat...(a)hotmail.com> wrote:
> Let 's talk about how to custom draw a window caption bar,any one
> interesting?
>
> 1. we know that we can custom draw a window caption in OnNcPaint
> 2. we also can custom the caption's height in OnNcCalcSize
>
> But if the window has a menu then i do not know how to draw.

It shouldnt be a problem. Look here though(ShadeCap):

http://www.microsoft.com/msj/0197/c/c0197.aspx

--
Ajay
From: Seetharam on
This article is too old (before WinXP came out). This code doesn't
work ok with XP visual themes. I think same will be the case on
Vista too.

-SM

From: Ajay Kalra on
On Jan 7, 9:42 am, Seetharam <smi...(a)gmail.com> wrote:
> This article is too old (before WinXP came out).

Why is that an issue? MFC is *as* old. Overriding WM_NCPAINT is even
older.

> This code doesn't
> work ok  with XP visual themes. I think same will be the case  on
> Vista too.

That would be the case when you custom paint anyway. Dont know much
about it.

--
Ajay
From: Ajay Kalra on
On Jan 7, 1:26 pm, Joseph M. Newcomer <newco...(a)flounder.com> wrote:
> In my
> OnNcPaint handler I should be able to call DrawDefaultBorders(), DrawSystemMenu(),
> DrawMinimize(), DrawMaximize(), DrawClose(), DrawHelp(), DrawCaptionBar(),
> DrawCaptionBarText(), and other useful primitives.  Instead, I have to simulate what has
> become release-specific visual effects without any way to do this in a
> platform-independent fashion.

I agree. I ran into this many years ago and was surprised that this
was the case. However I did find some of these attributes available in
Win32(I think min/max buttons are available).

--
Ajay