Microsoft KB Archive/84779

{|
 * width="100%"|

DOC: Don't Call Destroy Function on Loaded Cursor or Icon

 * }

Q84779

3.10 WINDOWS kbprg kbdocerr

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) 3.1

-

SUMMARY
The &quot;Microsoft Windows Software Development Kit: Programmer's Reference, Volume 2: Functions&quot; manual contains an error regarding the proper use of the DestroyCursor and DestroyIcon functions. This error is repeated a number of times throughout the manual. This article lists the various changes required to correct the error.

The manual states that when an application loads a cursor using the LoadCursor function, it should delete the cursor using the DestroyCursor function. Likewise, the manual states that when an application loads an icon using the LoadIcon function, it should delete the icon using the DestroyIcon function. These two statements are incorrect. DestroyCursor is used only on cursors created with the CreateCursor function and DestroyIcon is used only on icons created with the CreateIcon function.

To address this problem, make the following four changes to the &quot;Microsoft Windows SDK: Programmer's Reference, Volume 2: Functions&quot; manual:

 On page 216, modify the documentation for the DestroyCursor function to remove the reference to LoadCursor. On page 216, modify the documentation for the DestroyIcon function to remove the reference to LoadIcon.  On page 576, modify the documentation for the LoadCursor function to replace the following line An application should use the DestroyCursor function to destroy any private cursors it loads with the following line:   An application should use the DestroyCursor function to destroy any private cursors it creates with the CreateCursor function.   On page 577, modify the documentation for the LoadIcon function to replace the following line:   An application should use the DestroyIcon function to destroy any private icons it loads. with the following line:   An application should use the DestroyIcon</B> function to destroy any private icons it creates using the CreateIcon</B> function. </li></ul>

Additional query words: 3.10

Keywords : kbdocfix kb16bitonly kbCursor kbIcon kbResource kbSDKPlatform

Issue type :

Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK310