![]() |
Delphi-Version: XE5
How to save cursor from resource?
I have tree with resources from executable. I'm getting it as below:
Delphi-Quellcode:
ICO.Handle := CreateIconFromResourceEx(Memory, Size, &Type = Longint(RT_ICON), $30000, 0, 0, 0);
If I want to display it (eg. assign TIcon to TBitmap), this working for both icons and cursors, but if I want to save it, this working only for icons and for cursors raises exception class EInvalidGraphic with message 'Bitmap image is not valid'. F1, please :( |
Re: How to save cursor from resource?
Question propably should sound: "How to save hIcon to file?" :?:
|
AW: How to save cursor from resource?
Can you provide a sample resource you're trying to extract a cursor from?
|
Re: How to save cursor from resource?
Liste der Anhänge anzeigen (Anzahl: 1)
Sure. This is standard SQL cursor attached by XE6 (raw stream and extracted by another tool).
Let's repeat: icon or cursor created from this stream by CreateIconFromResourceEx() can be loaded to display, but if I want to save it as valid icon or cursor, TIcon raises exeption I told when cursor is created. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:55 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz