DOC: CWnd::LockWindowUpdate Does Not Unlock the Window
Article ID: 142445
Article Last Modified on 12/2/2003
APPLIES TO
- Microsoft Visual C++ 1.0 Professional Edition
- Microsoft Visual C++ 1.5 Professional Edition
- Microsoft Visual C++ 1.51
- Microsoft Visual C++ 1.52 Professional Edition
- Microsoft Visual C++ 2.0 Professional Edition
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 2.2
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Foundation Class Library 4.2
This article was previously published under Q142445
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 ).
Additional query words: 1.00 1.50 2.00 2.10 2.20 dskbsweep 4.00 4.10
Keywords: kbbug kbfix kbuidesign kbvc410fix kbdocfix kbdocerr KB142445