Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - How to force redraw on PropertyGrid?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to force redraw on PropertyGrid?

 Post Reply Post Reply
Author
Message
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Topic: How to force redraw on PropertyGrid?
    Posted: 08 June 2004 at 11:17am

For performance reasons, I want to prevent the PropertyGrid from redrawing while I clear categories and items.  The two methods I'm aware of in Visual Basic to do this are the 'LockWindowUpdate' function and the 'WM_SETREDRAW' message.

'WM_SETREDRAW' is the preferred method since 'LockWindowUpdate' only works on one control at a time.  When I execute the following command:

SendMessage PropertyGrid.hWnd, WM_SETREDRAW, 0, 0

The control stops redrawing (as expected).  When I execute the following command:

SendMessage PropertyGrid.hWnd, WM_SETREDRAW, 1, 0

The redraw is turned back on BUT only for future drawing.  It does not draw that last changes before redraw was turned back on.  Is there a way to force the PropertyGrid to redraw after I turn drawing back on?  I've tried the following:

RedrawWindow PropertyGrid.hWnd, ByVal 0&, ByVal 0&, RDW_INVALIDATE

But it the PropertyGrid still didn't redraw.  Any suggestions are greatly appreciated on how to control the Redraw of the PropertyGrid.  Thanks in advance!

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.