Forcing a window to redraw itself

Forcing a window to redraw itself

Post by Markus Svilan » Wed, 17 Jul 2002 23:21:34



Hi,

How do you force a window to redraw itself in a message handler?

I have a tree control, and I have over-ridden the OnPaint handler to do some
specialized drawing while a drag operation is taking place. I use an
OnLButtonUp handler to end the drag operation. The problem is that lines
from the specialized drawing are left over after the mouse button is
released.

I have tried using Invalidate(TRUE), RedrawWindow(), and UpdateWindow() at
the end of the OnLButtonUp handler, but none of them are able to force the
tree control to redraw itself (and thus remove the specialized drawing
artifacts).

Can someone help?

Thanks,

Markus.

--
  _ _                __
 / ) ) _ _ /_    _  (  )   ./_    _
/ / / (// /( (/_)    \  |///(//)_)
   (_              (__)

 
 
 

Forcing a window to redraw itself

Post by Laurent B » Fri, 19 Jul 2002 20:35:08


try :
 m_tree.Invalidate(...)



> Hi,

> How do you force a window to redraw itself in a message handler?

> I have a tree control, and I have over-ridden the OnPaint handler to do
some
> specialized drawing while a drag operation is taking place. I use an
> OnLButtonUp handler to end the drag operation. The problem is that lines
> from the specialized drawing are left over after the mouse button is
> released.

> I have tried using Invalidate(TRUE), RedrawWindow(), and UpdateWindow() at
> the end of the OnLButtonUp handler, but none of them are able to force the
> tree control to redraw itself (and thus remove the specialized drawing
> artifacts).

> Can someone help?

> Thanks,

> Markus.

> --
>   _ _                __
>  / ) ) _ _ /_    _  (  )   ./_    _
> / / / (// /( (/_)    \  |///(//)_)
>    (_              (__)



 
 
 

1. Forcing Focus redraw in IWebBrowser2 window

Hi

Does anyone know how to force a browser focus indicator
to be redrawn in window containing an IWebBrowser2
interface?

I am finding that when the window is expanded from the
minimized state, I have to tab once to get the indicator to
draw (also the focus moves from the original focused widget
when window was minimized).

Thanks in advance,
Gerald Parnis

2. WIN95 - Dial-up Problems

3. Forced Redrawing

4. NTLDR missing error -can't boot

5. Q: forced redraw of the status bar - progress control ?

6. IE6 SP1 setup takes forever, keeps stoping "Checking Signature..........."

7. Forcing a total screen redraw

8. OE6: certain newsgroups always show new/unread messages

9. How Do I Stop Websites That forces itself On Inernetexplorer (6) Everytime I am Online!?

10. Why does IE6 force itself on top?

11. How to stop browser from forcing itself as the main app??