Decipher Posted April 9, 2013 Share Posted April 9, 2013 (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 April 9, 2013 by Decipher Spoiler Link to comment Share on other sites More sharing options...
trancexx Posted April 9, 2013 Share Posted April 9, 2013 If the resource is not identified by integer then it's by string. Pass string not integer. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Decipher Posted May 5, 2013 Author Share Posted May 5, 2013 (edited) trancexx, Thanks I'll try that. Anonymous <- I'm trying to be something that I'm not just for you. Edited May 5, 2013 by Decipher Spoiler Link to comment Share on other sites More sharing options...
trancexx Posted May 5, 2013 Share Posted May 5, 2013 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. You be yourself, don't worry about me. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Decipher Posted May 7, 2013 Author Share Posted May 7, 2013 (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 May 7, 2013 by Decipher Spoiler Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now