Print Page | Close Window

How to force redraw on PropertyGrid?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=815
Printed Date: 21 November 2024 at 8:38am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to force redraw on PropertyGrid?
Posted By: Boyd
Subject: How to force redraw on PropertyGrid?
Date 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!




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net