How to force redraw on PropertyGrid? |
Post Reply |
Author | |
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
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! |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |