Objective Grid: Batching screen updates

Article ID: 104
Last updated: 22 Jun, 2018
Article ID: 104
Last updated: 22 Jun, 2018
Revision: 3
Views: 1928
Posted: 11 Jan, 2001
by Meltreger B.
Updated: 22 Jun, 2018
by Meltreger B.

Problem


Is there a way of batching updates to the screen? I would like to perform several operations in a row and cause the grid to re-paint only once at the end (instead of after each operation).


Cause



Action


You can use the CGXGridCore::LockUpdate() function to accompish this taks.  First, call LockUpdate(TRUE) to prevent any screen updates, then perform your operations, call LockUpdate(FALSE) to re-enable screen updated, and then repaint the grid to show the changes using a function like CGXGridCore::Redraw().

Example:

// First disable screen updates
LockUpdate(FALSE);




 
// Perform your batch of operations here ...
 

// Then re-enable screen updates and redraw
LockUpdate(FALSE);
Redraw();

This article was:   Helpful | Not helpful
Report an issue
Article ID: 104
Last updated: 22 Jun, 2018
Revision: 3
Views: 1928
Posted: 11 Jan, 2001 by Meltreger B.
Updated: 22 Jun, 2018 by Meltreger B.

Others in this category