DOC: CImageList::DeleteObject Generates a C2039 Error

Last reviewed: July 10, 1997
Article ID: Q138785
2.10 2.20 WINDOWS NT kbprg kbdocerr kbdocfix

The information in this article applies to:

  • Microsoft Visual C++, 32-bit Edition, versions 2.1 and 2.2

SUMMARY

Using CImageList::DeleteObject() results in compiler error C2039:

'DeleteObject' : is not a member of 'CImageList'.

MORE INFORMATION

The documentation for Visual C++ versions 2.1 and 2.2 lists DeleteObject() as a member function of class CImageList. This is not the case. The correct function to use is DeleteImageList(). This function is documented in Visual C++ version 4.x, but it is not documented in version 2.1 or 2.2. Below is the documentation for the function CImageList::DeleteImageList:

BOOL DeleteImageList( );

Return Value:

   Nonzero if successful; otherwise 0.

Remarks:

   Call this function to delete an image list.


KBCategory: kbprg kbdocerr kbdocfix
KBSubcategory: MfcMisc
Additional reference words: 2.10 2.20 Alpha MIPS Power PC x86 4.00 4.10
Keywords : MfcMisc kbdocerr kbdocfix kbprg
Technology : kbMfc
Version : 2.10 2.20
Platform : NT 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 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.