Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to avoid the entire window draw when WM_SETFOCUS or WM_KILLFOCUS message is received

11 views
Skip to first unread message

Matrixinline

unread,
Nov 5, 2009, 2:14:23 AM11/5/09
to
Hi All,

I do not want my window to redraw completely when it gets focus or
loose focus.

How can I avoid redrawing the entire window. I just wish only caption
frame gets redrawn.

Thanks
Anup

AliR

unread,
Nov 5, 2009, 10:39:04 AM11/5/09
to
Why do you think that your entire window is getting redrawn when the focus
changes?

That is not the default behavior of windows, only the none client area of
the window is redrawn (basically the border and titlebar).

Are you possibly doing something that cases the window to redraw?

AliR.

"Matrixinline" <anup.k...@gmail.com> wrote in message
news:a84c4303-9221-4aa9...@y10g2000prg.googlegroups.com...

Matrixinline

unread,
Nov 6, 2009, 12:49:47 AM11/6/09
to
On Nov 5, 7:39 am, "AliR" <A...@online.nospam> wrote:
> Why do you think that your entire window is getting redrawn when the focus
> changes?
>
> That is not the default behavior of windows, only the none client area of
> the window is redrawn (basically the border and titlebar).
>
> Are you possibly doing something that cases the window to redraw?
>
> AliR.
>
> "Matrixinline" <anup.kata...@gmail.com> wrote in message

>
> news:a84c4303-9221-4aa9...@y10g2000prg.googlegroups.com...
>
> > Hi All,
>
> > I do not want my window to redraw completely when it gets focus or
> > loose focus.
>
> > How can I avoid redrawing the entire window. I just wish only caption
> > frame gets redrawn.
>
> > Thanks
> > Anup

I found the the solution. one need to modify the style of window to
WS_CLIPCHILDREN. it means when the frame gets redrawn it excludes the
client region of window

AliR

unread,
Nov 6, 2009, 10:18:03 AM11/6/09
to
Ok But that still doesn't answer the question of why your window is getting
redrawn when the focus changes!

This is like putting a Band-Aid on a gun shot wound. Don't you think you
should take the bullet out first?

AliR.


"Matrixinline" <anup.k...@gmail.com> wrote in message

news:6d393887-d586-4c25...@u36g2000prn.googlegroups.com...

0 new messages