CGXGridCore::LockScrollbars

BOOL LockScrollbars(BOOL bLock);

bLock

Specifies if the scrollbars should be locked (TRUE) or unlocked (FALSE).

Return Value

Returns the previous state whether scrollbars were locked (TRUE) or unlocked (FALSE).

Remarks

Call this method before a time-consuming operation to prevent flickering of the scrollbars.

If bLockis TRUE, each call to UpdateScrollbars has no effect. If bLockis FALSE, UpdateScrollbars will be called and the scrollbars updated.

Example

This example illustrates the usage of LockScrollbars:

void CDataSheetView::OnColInsertsecond( )
{
   if (bFound)
   {
      CGXLongOperation theOp;
      BOOL bOldLock = LockScrollbars(TRUE);
      ...
      // Your long operation
      ...
      LockScrollbars(bOldLock);
   }
}

See Also

 CGXGridCore::UpdateScrollbars

CGXGridCore

 Class Overview |  Class Members