Announcement

Collapse
No announcement yet.

Load Bitmap From Resource

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scott Turchin
    replied
    How would I use this with "Control add image" then?
    WOuld I just do the same, "#131" ?
    I will test it 2nite, I'll have to remove the other bitmaps first since t hey are the same values..



    ------------------
    Scott

    Leave a comment:


  • Sven Blumenstein
    replied
    Hmmm... I think you shouldn't call "FreeLibrary", until you don't need the bitmap anymore, because "LoadBitmap" returns a handle.
    If you free the Library, the handle is killed, too.

    From the Win32.hlp:
    Code:
    LoadBitmap
    
    ...
    
    Return Value
    
    If the function succeeds, the return value is the handle of the specified bitmap.
    edited:
    change
    Code:
    hBmp = LoadBitmap(ByVal g_hInst, "#131")
    to
    Code:
    hBmp = LoadBitmap(hLib, "#131") 'or byval hLib?!
    ------------------
    E-Mail (home): mailto:[email protected][email protected]</A>
    E-Mail (work): mailto:[email protected][email protected]</A>

    [This message has been edited by Sven Blumenstein (edited July 09, 2001).]

    Leave a comment:


  • Scott Turchin
    replied
    OK I'm sorta lost here guys...

    I want to load a standard bitmap out of the SHELL32.DLL.
    In all versions it seems to be identifier #130, Win2k I'd rather use 131, no prob.


    So I gave it a shot, now what do I do? It's also not coming out as hBmp..


    Code:
    Local hBmp          As Long
    Local hLib          As Long
    Local SHELL32       As Asciiz * %MAX_PATH
    SHELL32 = CCSGetSystemDir & "\SHELL32.DLL"
    hLib = LoadLibrary(SHELL32)
    If hLib Then
       hBmp = LoadBitmap(ByVal g_hInst, "#131")
       FreeLibrary hLib
    End If
    ------------------
    Scott

    Leave a comment:


  • Gregery D Engle
    replied
    Check your email Scott, I sent you SP6 SHELL32.DLL

    ------------------
    -Greg

    Leave a comment:


  • Scott Turchin
    started a topic Load Bitmap From Resource

    Load Bitmap From Resource

    So, Question:

    if including the *EXACT* same bmp files in my application as are in the SHELL32.DLL is a copyright violation, is it also a copyright violation to CALL those same bitmaps from shell32.dll?


    Here lies the problem, I don't believe WInnt 4.0 has those bitmaps in them (??)...

    Could someone send me an NT4.0 Sp6 SHELL32.DLL??? I have a resource extractor and can check it out....

    Also, will the bitmap always be the same resource #???

    If WM_USER + 1024 is used, will that remain constant or do I have to code for it?

    Thanks,

    Scott

    ------------------
    Scott
Working...
X