From: John Smith on
When a windows app in foreground, it's title bar and taskbar label become
blue, and in background, become gray.

Now I want to customize my app's appearance, when my app in background
state, I hope it's title bar is still blue(just like in foreground state).
I hope it needn't me to draw the title bar myself.

Thanks in advance to anyone who can help!



From: Hector Santos on
John Smith wrote:

> When a windows app in foreground, it's title bar and taskbar label become
> blue, and in background, become gray.
>
> Now I want to customize my app's appearance, when my app in background
> state, I hope it's title bar is still blue(just like in foreground state).
> I hope it needn't me to draw the title bar myself.
>
> Thanks in advance to anyone who can help!

I believe you need to intercept the NC frame window messages for that.

--
HLS
From: Goran on
On Jan 15, 2:37 am, "John Smith" <ta...(a)126.com> wrote:
> When a windows app in  foreground, it's title bar and taskbar label become
> blue, and in  background, become gray.
>
> Now I want to customize my app's appearance, when my app in background
> state, I hope it's title bar is still blue(just like in foreground state)..
> I hope it needn't me to draw the title bar myself.
>
> Thanks in advance to anyone who can help!

I think you indeed need to draw the title bar (WM_NCPAINT).

But frankly, this question is one of those that don't deserve help. I
would like to know your motivation for doing this.

I certainly don't like that frames of programs I use behave in a non-
standard way. Also, it's not about grey-blue distinction, actual
colors depend on color scheme and windows version (it's not really
grey-blue e.g. on Vista, is it?). And finally, it's not about
background-foreground (term is loaded anyhow), it's about focus.

I hope you give up on that idea for the benefit of your program users.

Goran.