Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExtractIcon or ExtractAssociatedIcon...
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00653833
Message ID:
00656916
Views:
29
>>About DestroyIcon(). OleCreatePictureIndirect() is called with third parameter fOwn=1. This means that picture (Icon in this case) will be destroyed when the object is destroyed.
>
>I understand that's what the docs say, but all three of the "ExtractIcon" functions specifically mention that you must call DestroyIcon() in order to destroy the icon. In this case, since OleCreatePictureIndirect() has no way of knowing the handle that references the picture (it isn't passed as a parameter), I'd at least err on the side of caution and use that function as well. I doubt if it would hurt anything.

HICON is passed as a parameter within PICTDESC structure. I think when fOwn=TRUE the Picture object do not create a copy of picture and DestroyIcon() will break the Picture object. But you can set fOwn=FALSE and destroy icon when you want.
Previous
Reply
Map
View

Click here to load this message in the networking platform