Shothic Posted January 30, 2010 Share Posted January 30, 2010 Hi I wrote the dll with image in delphi and I want to use this image from dll to auto it gui or something Dll structure : i000 BITMAP image.bmp Dll : ResDll.dll Please Help Link to comment Share on other sites More sharing options...
ProgAndy Posted January 30, 2010 Share Posted January 30, 2010 You should be able to use it with the Resources-UDFs by Zedna *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Shothic Posted January 30, 2010 Author Share Posted January 30, 2010 noo I don't understand this udf I have the ResDll.res and ResDll.dll and how I drow the image from this files Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 30, 2010 Moderators Share Posted January 30, 2010 Shothic,noo I don't understand this udfWhat do you not understand about the UDF? It is the best way to get images from a DLL into your GUI, but it needs to be used correctly and looking at the time between posts you have not yet spent anywhere near long enough to get to grips with it. Why not post the code you have and perhaps the DLL so we can point you in the right direction? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
James Posted January 30, 2010 Share Posted January 30, 2010 Shothic, Seriously? You've not even downloaded it have you. There are plenty of examples showing only a few of the ways you can use the UDF. Take some time to learn it. The resources are there plain and simple. James Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Shothic Posted January 30, 2010 Author Share Posted January 30, 2010 #include "GUIConstantsEx.au3" #include "StaticConstants.au3" #include "resources.au3" $gui = GUICreate("example ",400,400) $pic1 = GUICtrlCreatePic("",0,0,400,150) _ResourceSetImageToCtrl($pic1, "ResDll.dll",17,-1) GUISetState(@SW_SHOW) While 1 Wend I don't now is it good and I'm not sure for $ResType and $dll for my ResDll.dll Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 30, 2010 Moderators Share Posted January 30, 2010 Shothic,What type of image have you put in your DLL? .bmp, .jpg. .png?Download ResHacker from here and you will be able to check the resource name and type for the image within your DLL.Then we can start to use the UDF and get your image into your GUI. M23P.S. Before I forget, usingWhile 1 Wendis very bad coding practice as it will eat all your CPU cycles. Always have either a GUIGetMsg command or a Sleep(10) in there! Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Zedna Posted January 30, 2010 Share Posted January 30, 2010 (edited) I think this may be the correct use for you: #include "GUIConstantsEx.au3" #include "StaticConstants.au3" #include "resources.au3" $gui = GUICreate("example ",400,400) $pic1 = GUICtrlCreatePic("",0,0,400,150) ; set image to picture control from external DLL resource _ResourceSetImageToCtrl($pic1, "#17", $RT_BITMAP, @ScriptDir & "\ResDll.dll") GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = -3 Then Exit Wend Edited January 30, 2010 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Shothic Posted January 30, 2010 Author Share Posted January 30, 2010 In reshacker :Creating Dll :In ResDll.RC i000 BITMAP image.bmp >> ResDll.res >>>> ResDll.DllImage is bmpThx For help but what next? Link to comment Share on other sites More sharing options...
Shothic Posted January 30, 2010 Author Share Posted January 30, 2010 #include "GUIConstantsEx.au3"#include "StaticConstants.au3"#include "resources.au3"$gui = GUICreate("example ",400,400)$pic1 = GUICtrlCreatePic("",0,0,400,150); set image to picture control from external DLL resource_ResourceSetImageToCtrl($pic1, "#17", $RT_BITMAP, @ScriptDir & "\ResDll.dll")GUISetState(@SW_SHOW)While 1 If GUIGetMsg() = -3 Then ExitWendNo it does not workIn Delphi is working Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 30, 2010 Moderators Share Posted January 30, 2010 (edited) Shothic, Ok, the resource is a bitmap called "1000". Try this: #include "GUIConstantsEx.au3" #include "StaticConstants.au3" #include "resources.au3" $gui = GUICreate("example ",400,400) $pic1 = GUICtrlCreatePic("",0,0,400,150) ; set image to picture control from external DLL resource _ResourceSetImageToCtrl($pic1, "1000", $RT_BITMAP, @ScriptDir & "\ResDll.dll") GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = -3 Then Exit Wend M23 Edit: Zedna, apologies - I had not seen your post. Edited January 30, 2010 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Zedna Posted January 30, 2010 Share Posted January 30, 2010 (edited) If the name of bitmap is i000 (and not 1000) then use _ResourceSetImageToCtrl($pic1, "i000", $RT_BITMAP, @ScriptDir & "\ResDll.dll") Edited January 30, 2010 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 30, 2010 Moderators Share Posted January 30, 2010 Zedna, Well spotted - it is my old eyes you know! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Shothic Posted January 30, 2010 Author Share Posted January 30, 2010 Thanks Zedna And M23 ALL works great And I'll check it to imageserch.au3 THX : Link to comment Share on other sites More sharing options...
Shothic Posted January 30, 2010 Author Share Posted January 30, 2010 grrrr I don't know why it don't want to work in imageserch expandcollapse popup#include "GUIConstantsEx.au3" #include "StaticConstants.au3" #include "resources.au3" #include "ImageSearch.au3" $gui = GUICreate("example ",400,400) $pic1 = GUICtrlCreatePic("",20,20,400,150) ; set image to picture control from external DLL resource $pic = _ResourceSetImageToCtrl($pic1, "i000", $RT_BITMAP, @ScriptDir & "\ResDll.dll") GUISetState(@SW_SHOW) $image = _ResourceGetAsImage ("i000", $RT_BITMAP, @ScriptDir & "\ResDll.dll") HotKeySet ( "{End}" , "Terminate" ) While 1 $x1=0 $y1=0 If GUIGetMsg() = -3 Then Exit $result1 = _ImageSearch($image,1,$x1,$y1,0) IF $result1=1 Then MouseClick("left",$x1,$y1,1,1) EndIf Wend Func Terminate() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
Zedna Posted January 30, 2010 Share Posted January 30, 2010 (edited) grrrrI don't know why it don't want to work in imageserchImageSearch doesn't support use of images in memory. It supports only images on disc (you must use absolute path to image on disc).You can read all of this in ImageSearch topic., see this my post about it:#727357 Edited January 30, 2010 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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