EloB Posted September 27, 2006 Share Posted September 27, 2006 (edited) Hi How do I use bitmaps from dll? I found a bitmap (1101) from credui.dll that I want in my GUI but I dont know how to put it into my GUI. Is it possible to use the bitmap without making a picture of it? Edited September 27, 2006 by EloB Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 27, 2006 Share Posted September 27, 2006 HI, do you want to extract the icon like doing it with resource hacker? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
EloB Posted September 27, 2006 Author Share Posted September 27, 2006 (edited) Yes and put the bitmap into my GUI. But how do I do that ? Edited September 27, 2006 by EloB Link to comment Share on other sites More sharing options...
martin Posted September 27, 2006 Share Posted September 27, 2006 Yes and put the bitmap into my GUI.But how do I do that ?If you mean how do you extract the icon from the dll then search for 'freeware icon extractor'. I use one which I can no longer trace on the internet, but there are plenty of others. These extracters can read images from exe's or dll's and save them to a file. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
jpam Posted September 27, 2006 Share Posted September 27, 2006 that would be very nice a recource dll looking for that to ! next question ,how to build a recource dll ? jpam Link to comment Share on other sites More sharing options...
Yuraj Posted September 27, 2006 Share Posted September 27, 2006 this works but repaint doesn't happen...$gui = GUICreate("") $pic = GUICtrlCreatePic("",0,0,200,200) GUISetState() SetBitmapResourceToPicCtrl($gui,$pic,"c:\myfile.exe",47) While 1 If GUIGetMsg() = -3 Then Exit WEnd Func SetBitmapResourceToPicCtrl($hwnd,$ctrl,$file,$resource) Local Const $STM_SETIMAGE = 0x0172 Local Const $IMAGE_BITMAP = 0 Local Const $LR_CREATEDIBSECTION = 0x2000 Local $A = ControlGetHandle($hwnd,"",$ctrl) Local $DLLinst = DLLCall("kernel32.dll","hwnd","LoadLibrary","str",$file) $DLLinst = $DLLinst[0] Local $hBitmap = DLLCall("user32.dll","hwnd","LoadImage","hwnd",$DLLinst,"short",$resource, _ "int",$IMAGE_BITMAP,"int",0,"int",0,"int",0) $hBitmap = $hBitmap[0] _SendMessage($A,$STM_SETIMAGE,$IMAGE_BITMAP,$hBitmap); DLLCall("gdi32.dll","int","DeleteObject","hwnd",$hBitmap) DLLCall("kernel32.dll","int","FreeLibrary","hwnd",$DLLinst) EndFunc Func _SendMessage($hWnd, $msg, $wParam = 0, $lParam = 0, $r = 0, $t1 = "int", $t2 = "int") Local $ret = DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", $msg, $t1, $wParam, $t2, $lParam) If @error Then Return SetError(@error, @extended, "") If $r >= 0 And $r <= 4 Then Return $ret[$r] Return $ret EndFunc ; _SendMessage() Hi! This code does me not work. Sometimes work and sometime doesn't work... Yuraj ShellExecute("http://www.yuraj.ucoz.com")ProcessClose(@AutoItPID) Link to comment Share on other sites More sharing options...
EloB Posted September 27, 2006 Author Share Posted September 27, 2006 (edited) Thank you guys! This is exactly what Iam looking for Iam really bad at dlls... Does anyone know a good internet tutorial for dlls? Edited September 27, 2006 by EloB Link to comment Share on other sites More sharing options...
EloB Posted September 27, 2006 Author Share Posted September 27, 2006 (edited) Yeah... This one works much better! Good luck with the repainting issue... Thanks for helping me! Edited September 27, 2006 by EloB Link to comment Share on other sites More sharing options...
Yuraj Posted September 28, 2006 Share Posted September 28, 2006 Thank you, LARRY! Yuraj ShellExecute("http://www.yuraj.ucoz.com")ProcessClose(@AutoItPID) Link to comment Share on other sites More sharing options...
Fossil Rock Posted September 29, 2006 Share Posted September 29, 2006 What does "C:\myfile.exe" consist of ? Got the code and graphic(s) to recreate it? Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
jpam Posted October 1, 2006 Share Posted October 1, 2006 http://www.autoitscript.com/forum/index.ph...pid=244285&jpam 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