Announcement

Collapse
No announcement yet.

Load Bitmap From Resource

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

  • 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
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    Check your email Scott, I sent you SP6 SHELL32.DLL

    ------------------
    -Greg
    -Greg
    [email protected]
    MCP,MCSA,MCSE,MCSD

    Comment


    • #3
      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
      Scott Turchin
      MCSE, MCP+I
      http://www.tngbbs.com
      ----------------------
      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

      Comment


      • #4
        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).]

        Comment


        • #5
          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
          Scott Turchin
          MCSE, MCP+I
          http://www.tngbbs.com
          ----------------------
          True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

          Comment

          Working...
          X