I need help with some API functions-VBForums
Results 1 to 2 of 2

Thread: I need help with some API functions

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242

    Talking

    Hello!

    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.

    Regards
    Zvonko
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    zvonko.bostjancic@siol.net
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.