Jump to content

Recommended Posts

Posted (edited)

I'm trying to display bitmaps stored inside a theme resource dll on a GUI. I'd like to be able to specify the name as it is displayed in ResHacker for the function call. I can extract strings as they are numbered but the bitmap images listed under RT_BITMAP are not numbered - I'm using Trancexx's resource viewer.

I've tried.

#Include <WinAPI.au3>

Global Const $STM_SETIMAGE = 0x0172

$hTest = GUICreate("", - 1, - 1, -1, -1)
$hPic = GUICtrlCreatePic("", -1, -1, 50, 22)
Local $hInstance = _WinAPI_LoadLibrary($sThemeFile)
Local $hBitmap = _WinAPI_LoadImage($hInstance, "((((Some Integer that I can't find))))", $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR)
GUICtrlSendMsg($hPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hBitmap)
GUISetState(@SW_SHOW)

Thanks,

Anonymous

Edited by Decipher
Spoiler

censored.jpg

 

  • 4 weeks later...
Posted (edited)

trancexx,

Thanks I'll try that. :)

Anonymous <- I'm trying to be something that I'm not just for you. :thumbsup:

Edited by Decipher
Spoiler

censored.jpg

 

Posted

trancexx,

Thanks I'll try that. :)

Do report back. I'm interested in this.

Anonymous <- I'm trying to be something that I'm not just for you. :thumbsup:

You be yourself, don't worry about me.

♡♡♡

.

eMyvnE

Posted (edited)

trancexx,

Your right it does work with the string identifier although I know I would've tried that before posting. I wonder what the problem was?

#Include <WinAPI.au3>
#include <Constants.au3>
Global Const $STM_SETIMAGE = 0x0172

$hTest = GUICreate("", - 1, - 1, -1, -1)
$hPic = GUICtrlCreatePic("", -1, -1, 50, 22)
Local $hInstance = _WinAPI_LoadLibrary("H:\Windows\Resources\Themes\Luna\luna.msstyles")
Local $hBitmap = _WinAPI_LoadImage($hInstance, "BLUE_STARTBUTTON_BMP", $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR)
GUICtrlSendMsg($hPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hBitmap)
GUISetState(@SW_SHOW)

While 1
   Sleep(5000)
WEnd

When displaying the images in the theme dll the transparent section is pink and the image is repeated. How can I display it the way MS does? I realize that its their original format and the dll isn't the problem but I'd like to be able to utilize them as is.

Anonymous

Edited by Decipher
Spoiler

censored.jpg

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...