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:
00659511
Views:
59
>>One other thing I noticed. In checking the undocmented OleSavePictureFile(), I note that it takes a pointer to BSTR. In your code you emulate this using MultiByteToWideChar() to create a WCHAR. I, of course, am assuming that this seems to work. What comes to mind, however, is that a BSTR and a WCHAR aren't the same thing. While the portion of the BSTR (and this is for lurkers) representing the file name is indeed WCHAR, there is also a header portion to a BSTR that allows the string itself to be queried as to its length.
>
>I'm using SysAllocString() to create BSTR from WCHAR. May be I forgot to free BSTR by SysFreeString() after using. Instead of MultiByteToWideChar() it may be more simple to create WCHAR manually by inserting Chr(0) between chars.
>
Alexander,

I want to thank you again for the information you've provided. I have been able to successfully create icon files (both 32x32 and 16x16) from the icon handles (including being able to shrink a 32x32 to a 16x16. The only problem seems to be that an older image editor (ImagEdit) doesn't seem to recognize the format of the 16x16 (says it's not version 3.0). Another, ImageEdit32, loads but doesn't display anything. However, VC++ 6.0 SP5 seems to have no trouble.

I mention this because I'm wondering if the smaller image will show up in the Windows Explorer. I haven't tested it so far. If you've got any information, I'd appreciate hearing from you.

I also managed to circumvent the memory management routines to get a local copy of the BSTR. I used SYS(2600) passing the SysAllocString() function as a parameter.

Off thread, the Common Dialog COM object is pretty cool. While you can't position the dialog where you want, you can center it.

Thanks again,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform