Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
LockWindowUpdate
CWnd                                        Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  Windows 3.1 only
 
  BOOL LockWindowUpdate();
 
  Remarks
 
  Disables or reenables drawing in the given window. A locked window
  cannot be moved. Only one window can be locked at a time.
 
  If an application with a locked window (or any locked child windows)
  calls the GetDC, GetDCEx, or BeginPaint Windows functions, the
  called function returns a device context whose visible region is empty.
  This will occur until the application unlocks the window by calling the
  LockWindowUpdate member function.
 
  While window updates are locked, the system keeps track of the bounding
  rectangle of any drawing operations to device contexts associated with a
  locked window. When drawing is reenabled, this bounding rectangle is
  invalidated in the locked window and its child windows to force an
  eventual WM_PAINT message to update the screen. If no drawing has
  occurred while the window updates were locked, no area is invalidated.
 
  The LockWindowUpdate member function does not make the given window
  invisible and does not clear the WS_VISIBLE style bit.
 
  Return Value
 
  Nonzero if the function is successful. It is 0 if a failure occurs or if
  the LockWindowUpdate function has been used to lock another window.
 
  See Also
 
  CWnd::GetDCEx, ::LockWindowUpdate
 
 
                                     -♦-