Apr 28th, 2000, 01:12 AM
I'd like to use some api functions for reading resources form resource-only DLL that I created in VC++. I can easyly load string, but when I try to load icons, bitmaps and cursors, it stopps. So I'd like someone to help me with loading those icons, bitmaps and crusors from DLL. I tried with functions LoadIcon, LoadBitmap and LoadCursor, but they all retrurn Long and I don't know how can I from this value generate (or retrieve) icon or bitmap or cursor.
I wold be very glad if someone would help me.
Ilirska Bistrica, Slovenia
Using VS6 Professional with SP3
Programming mostly in VB and I've started to learn VC++ & MFC
Apr 29th, 2000, 06:30 PM
the long value they return is called a handle to that object, the cursor one's easy, use the setcursor api to set that cursor to the mouse, it returns a long aswell, that's a handle to the old cursor, make sure you put that back when you've finished.
All Api Calls that deal with icons bitmaps and cursors take the long handles as parameters, you just have to get used to the fact that you're dealling with a number where you're expecting an object. Strings are numbers too, but VB knows how to handle them so it doesn't let you see the number, if you use StrPtr(strMyString) you can see the number.
Click Here to Expand Forum to Full Width