Keep a window from repainting 
Author Message
 Keep a window from repainting

Is there a message I can send to a window to tell itself not to update or
repaint itself?

I've got a window that has subwindows which I don't have that much control
over,
I want to tell the parent window to not attempt to repaint itself while I
tear down and recreate
the child windows to remove flicker...



Mon, 19 Sep 2005 06:50:36 GMT  
 Keep a window from repainting
Is LockWindowUpdate() supported on Windows CE?  That's how I'd do it in
Win32 on the desktop...

Paul T.


Quote:
> Is there a message I can send to a window to tell itself not to update or
> repaint itself?

> I've got a window that has subwindows which I don't have that much control
> over,
> I want to tell the parent window to not attempt to repaint itself while I
> tear down and recreate
> the child windows to remove flicker...



Mon, 19 Sep 2005 07:00:47 GMT  
 Keep a window from repainting
Hi,

LockWindowUpdate is not supported. Try CWnd::SetRedraw(...) or look up WM_SETREDRAW

Cheers

Doug Forster


Quote:
> Is LockWindowUpdate() supported on Windows CE?  That's how I'd do it in
> Win32 on the desktop...

> Paul T.



> > Is there a message I can send to a window to tell itself not to update or
> > repaint itself?

> > I've got a window that has subwindows which I don't have that much control
> > over,
> > I want to tell the parent window to not attempt to repaint itself while I
> > tear down and recreate
> > the child windows to remove flicker...



Mon, 19 Sep 2005 08:19:46 GMT  
 Keep a window from repainting
Catch the WM_PAINT messages and only allow them when you want to repaint.

btw - You could also subclass the child windows to gain more control of
them.

--
~Demitri

(This posting is provided "AS IS" with no warranties, and confers no
rights.)

"Doug" <doug AT ZAPTHIS toniq ZAPTHIS DOT co ZAPTHIS DOT ZAPTHIS nz> wrote

Hi,

LockWindowUpdate is not supported. Try CWnd::SetRedraw(...) or look up
WM_SETREDRAW

Cheers

Doug Forster



Quote:
> Is LockWindowUpdate() supported on Windows CE?  That's how I'd do it in
> Win32 on the desktop...

> Paul T.



> > Is there a message I can send to a window to tell itself not to update
or
> > repaint itself?

> > I've got a window that has subwindows which I don't have that much
control
> > over,
> > I want to tell the parent window to not attempt to repaint itself while
I
> > tear down and recreate
> > the child windows to remove flicker...



Mon, 19 Sep 2005 09:32:18 GMT  
 Keep a window from repainting
Hi

check out WM_SETREDRAW message.

--
Yaroslav Goncharov
Microsoft MVP - Mobile Devices
Smartphone Developer Network
www.smartphonedn.com


Quote:
> Is there a message I can send to a window to tell itself not to update or
> repaint itself?

> I've got a window that has subwindows which I don't have that much control
> over,
> I want to tell the parent window to not attempt to repaint itself while I
> tear down and recreate
> the child windows to remove flicker...



Mon, 19 Sep 2005 15:32:53 GMT  
 Keep a window from repainting
Yeah I tried that without much luck.
Problem is that I'm trying to prevent the HTML Control from drawing.
I have an ATL window that contains an HTML Control in it.  I can set
WM_SETREDRAW = FALSE for
the ATL window and the HWND I get back from creating the HTML window,
however it looks like (when using remote spy)
that when you create the HTML window it in turn creates a SUB window for the
display and I don't have access to that
HWND to try setting WM_SETREDRAW there.

This is the layout I'm seeing in remote spy:

My ATL window                                 //Tried setting WM_SETREDRAW
FALSE here
          |
         ---HTML Window I create        //Tried setting WM_SETREDRAW FALSE
here too
                        |
                        --- Inner window created by HTML Control
//Can I access this?

"Doug" <doug AT ZAPTHIS toniq ZAPTHIS DOT co ZAPTHIS DOT ZAPTHIS nz> wrote

Hi,

LockWindowUpdate is not supported. Try CWnd::SetRedraw(...) or look up
WM_SETREDRAW

Cheers

Doug Forster



Quote:
> Is LockWindowUpdate() supported on Windows CE?  That's how I'd do it in
> Win32 on the desktop...

> Paul T.



> > Is there a message I can send to a window to tell itself not to update
or
> > repaint itself?

> > I've got a window that has subwindows which I don't have that much
control
> > over,
> > I want to tell the parent window to not attempt to repaint itself while
I
> > tear down and recreate
> > the child windows to remove flicker...



Tue, 20 Sep 2005 00:05:13 GMT  
 Keep a window from repainting
Hi Gordon,

Haven't needed to do anything like this in CE myself, but I notice an absence of child window functions in the docs. Could ChildWindowFromPoint get the client window you need? I suppose just hiding the control still causes unacceptable flickering ? Why exactly does it get invalidated? Would an explicit ValidateRect help?

Cheers

Doug Forster

Quote:

> Yeah I tried that without much luck.
> Problem is that I'm trying to prevent the HTML Control from drawing.
> I have an ATL window that contains an HTML Control in it.  I can set
> WM_SETREDRAW = FALSE for
> the ATL window and the HWND I get back from creating the HTML window,
> however it looks like (when using remote spy)
> that when you create the HTML window it in turn creates a SUB window for the
> display and I don't have access to that
> HWND to try setting WM_SETREDRAW there.

> This is the layout I'm seeing in remote spy:

> My ATL window                                 //Tried setting WM_SETREDRAW
> FALSE here
>           |
>          ---HTML Window I create        //Tried setting WM_SETREDRAW FALSE
> here too
>                         |
>                         --- Inner window created by HTML Control
> //Can I access this?

> "Doug" <doug AT ZAPTHIS toniq ZAPTHIS DOT co ZAPTHIS DOT ZAPTHIS nz> wrote

> Hi,

> LockWindowUpdate is not supported. Try CWnd::SetRedraw(...) or look up
> WM_SETREDRAW

> Cheers

> Doug Forster



> > Is LockWindowUpdate() supported on Windows CE?  That's how I'd do it in
> > Win32 on the desktop...

> > Paul T.



> > > Is there a message I can send to a window to tell itself not to update
> or
> > > repaint itself?

> > > I've got a window that has subwindows which I don't have that much
> control
> > > over,
> > > I want to tell the parent window to not attempt to repaint itself while
> I
> > > tear down and recreate
> > > the child windows to remove flicker...



Tue, 20 Sep 2005 04:46:29 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. How can i resize window, without repainting window

2. ? Call-Stack and Break-Point windows stick, and debug windows keep resetting

3. How to keep a window on top of all windows

4. Windows repainting

5. Windows client area repaint problem

6. Repaint window while in busy loop

7. Newbie Help: Repainting child windows

8. problem repainting part of window using CScrollView

9. CScrollView does not repaint part of Window

10. Own child window - wndclass, repainting etc...

11. How to repaint all windows on desktop?

12. why window not repaint

 

 
Powered by phpBB® Forum Software