DOC: CWnd::LockWindowUpdate Does Not Unlock the Window

Last reviewed: July 31, 1997
Article ID: Q142445
WINDOWS             | WINDOWS NT
1.00 1.50 1.51 1.52 | 1.00 2.00 2.10 2.20 4.00 kbprg kbdocerr kbdocfix

The information in this article applies to:

  • The Microsoft Foundation Classes (MFC) included with:

    - Microsoft Visual C++ for Windows, versions 1.0, 1.5, 1.51, 1.52 - Microsoft Visual C++, 32-bit Edition, versions 1.0, 2.0, 2.1,

         2.2, 4.0
    

SUMMARY

The documentation for CWnd::LockWindowUpdate() states this function will disable or reenable drawing for the CWnd object. In the remarks section, the sentence "Disables or reenables drawing in the given window" is incorrect. Starting with Visual C++ version 2.0, you should use CWnd::UnlockWindowUpdate() to reenable drawing to a window locked with CWnd::LockWindowUpdate().

The documentation error was corrected in Visual C++ 4.1.

MORE INFORMATION

CWnd::LockWindowUpdate() takes no parameters and is implemented as an in-line call to the Windows function ::LockWindowUpdate(). The function ::LockWindowUpdate() is called with the this->m_hWnd parameter which causes the window to be locked. To re-enable drawing, NULL should be passed to ::LockWindowUpdate().

In Visual C++ version 2.0 and later, call CWnd::UnlockWindowUpdate() to reenable drawing to your window. In earlier versions, call the Windows ::LockWindowUpdate( NULL ).


KBCategory: kbprg kbdocerr kbdocfix
KBSubcategory: MfcUI
Additional reference words: 1.00 1.50 2.00 2.10 2.20 4.00 4.10
Keywords : MfcUI kbdocerr kbdocfix kbprg
Technology : kbMfc
Version : 1.00 1.50 1.51 1.52 2.00 2.10 2.
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 31, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.