UltraFine Posted November 10, 2008 Share Posted November 10, 2008 (edited) Hi,I want to create a dll file for all the icons a will need in myapplication. Something like the "SHELL32.dll" in windows. Anybody knowwhere I can find some sample code to create something like that ?Question by: emmanuel (on another Forum and i copied it because of same issue)there was a answer (Link) http://bytes.com/forum/thread348556.htmlFrom VB Helper (Link) http://www.vb-helper.com/howto_icon_dll.htmlthere is a Auto Hot Key Script (*.ahk)ROD-Ex is a script that demonstrates automation of* Adding resources to AutoHotkeySC.bin* Creating a Resource only DLL from scratch(Link) http://www.autohotkey.com/forum/topic30228.htmlbut i don't know how to do it because i knows only AutoIt and no solution is working for me. Edited November 10, 2008 by L0veUK Link to comment Share on other sites More sharing options...
Andreik Posted November 10, 2008 Share Posted November 10, 2008 Hi,I want to create a dll file for all the icons a will need in myapplication. Something like the "SHELL32.dll" in windows. Anybody knowwhere I can find some sample code to create something like that ?Question posted by: emmanuel (on another Forum and i copied it because of same issue)First, you need Visual C++ 2008 Express Edition or other software to can make a dll file.If you have this, I`ll show you an example. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
UltraFine Posted November 10, 2008 Author Share Posted November 10, 2008 First, you need Visual C++ 2008 Express Edition or other software to can make a dll file.If you have this, I`ll show you an example.Andreik, Thanks for the quick reply!- i don't have, do i need to install it first? any other way to do it? Link to comment Share on other sites More sharing options...
Andreik Posted November 10, 2008 Share Posted November 10, 2008 Andreik, Thanks for the quick reply!- i don't have, do i need to install it first? any other way to do it?You cannot create a dll with AutoIt.You need to install Visual C++ 2008 Express Edition or other program who can do that. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
UltraFine Posted November 10, 2008 Author Share Posted November 10, 2008 You cannot create a dll with AutoIt.Why?You need to install Visual C++ 2008 Express EditionDownloadin... 10Kbps or other program who can do that. which program? Link to comment Share on other sites More sharing options...
Marlo Posted November 10, 2008 Share Posted November 10, 2008 (edited) AutoIt doesnt have the ability ro create DLL files...it just wasnt made for that. Also why not use AutoIt3Wrappers? do a search for "#AutoIt3Wrapper_Res_Icon_Add" This will let you add as many icons to your compiled script as you like. Edited November 10, 2008 by Marlo Click here for the best AutoIt help possible.Currently Working on: Autoit RAT Link to comment Share on other sites More sharing options...
Andreik Posted November 10, 2008 Share Posted November 10, 2008 Here you will find answers for your questions?http://www.autoitscript.com/forum/index.ph...st&p=593838 When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Andreik Posted November 10, 2008 Share Posted November 10, 2008 (edited) Here is an example of dll resource file, I use that for my Yahoo! Avatar script: expandcollapse popup// Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon placed first or with lowest ID value becomes application icon LANGUAGE 9, 1 #pragma code_page(1252) 1 ICON "ICON1.ico" 2 ICON "ICON2.ico" 3 ICON "ICON3.ico" 4 ICON "ICON4.ico" 5 ICON "ICON5.ico" 6 ICON "ICON6.ico" #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" "\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED Edited November 10, 2008 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Zedna Posted November 10, 2008 Share Posted November 10, 2008 Look at my resource UDFhttp://www.autoitscript.com/forum/index.php?showtopic=51103 Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
AzKay Posted November 10, 2008 Share Posted November 10, 2008 What I did when I needed to do this was, I googled for "hello world" dll examples. They usually come with source code, and a compiled dll. Then I just used resource hacker on the dll, added my icons. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
UltraFine Posted November 10, 2008 Author Share Posted November 10, 2008 Look at my resource UDF http://www.autoitscript.com/forum/index.php?showtopic=51103yeah, i know about it. i myself tried many times but it's not working for me. i used autoit wrapper along with ResHacker but no success. i could not understand your example you uploaded there. can you give me a very simple example of adding a icon to my app? you can use my code for example. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Icon_Path = "E:\Icons\iCandy\Cd.ico" $Form1 = GUICreate("Different sizes of icons", 254, 117, Default, Default) $Icon1 = GUICtrlCreateIcon($Icon_Path, 0, 8, 8, 64, 64) $Icon2 = GUICtrlCreateIcon($Icon_Path, 0, 80, 16, 48, 48) $Icon3 = GUICtrlCreateIcon($Icon_Path, 0, 144, 24, 32, 32) $Icon4 = GUICtrlCreateIcon($Icon_Path, 0, 192, 24, 24, 24) $Label1 = GUICtrlCreateLabel("64x64 48x48 32x32 24x24", 16, 88, 220, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Thanks Link to comment Share on other sites More sharing options...
Tlem Posted November 10, 2008 Share Posted November 10, 2008 @L0veUKIf you can understand French language, take a look here : http://www.autoitscript.fr/forum/viewtopic.php?p=2006#p2006 Best Regards.Thierry Link to comment Share on other sites More sharing options...
UltraFine Posted November 10, 2008 Author Share Posted November 10, 2008 @L0veUKIf you can understand French language, take a look here : http://www.autoitscript.fr/forum/viewtopic.php?p=2006#p2006Thanks, but i can't understand english. Link to comment Share on other sites More sharing options...
oMBRa Posted November 10, 2008 Share Posted November 10, 2008 He said french, lol Link to comment Share on other sites More sharing options...
Zedna Posted November 10, 2008 Share Posted November 10, 2008 (edited) yeah, i know about it. i myself tried many times but it's not working for me. i used autoit wrapper along with ResHacker but no success. i could not understand your example you uploaded there. can you give me a very simple example of adding a icon to my app? you can use my code for example. Thanks For embedding icons you don't need my resource UDF. Just use #AutoIt3Wrapper_Res_Icon_Add= as somebody said: #AutoIt3Wrapper_Res_Icon_Add=E:\Icons\iCandy\Cd.ico #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Different sizes of icons", 254, 117, Default, Default) $Icon1 = GUICtrlCreateIcon('', 0, 8, 8, 64, 64) GUICtrlSetImage(-1,@ScriptFullPath, -5) $Icon2 = GUICtrlCreateIcon('', 0, 80, 16, 48, 48) GUICtrlSetImage(-1,@ScriptFullPath, -5) $Icon3 = GUICtrlCreateIcon('', 0, 144, 24, 32, 32) GUICtrlSetImage(-1,@ScriptFullPath, -5) $Icon4 = GUICtrlCreateIcon('', 0, 192, 24, 24, 24) GUICtrlSetImage(-1,@ScriptFullPath, -5) $Label1 = GUICtrlCreateLabel("64x64 48x48 32x32 24x24", 16, 88, 220, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited November 10, 2008 by Zedna Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
UltraFine Posted November 10, 2008 Author Share Posted November 10, 2008 For embedding icons you don't need my resource UDF. Just use #AutoIt3Wrapper_Res_Icon_Add= as somebody said: #AutoIt3Wrapper_Res_Icon_Add=E:\Icons\iCandy\Cd.ico #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Different sizes of icons", 254, 117, Default, Default) $Icon1 = GUICtrlCreateIcon('', 0, 8, 8, 64, 64) GUICtrlSetImage(-1,@ScriptFullPath, -5) $Icon2 = GUICtrlCreateIcon('', 0, 80, 16, 48, 48) GUICtrlSetImage(-1,@ScriptFullPath, -5) $Icon3 = GUICtrlCreateIcon('', 0, 144, 24, 32, 32) GUICtrlSetImage(-1,@ScriptFullPath, -5) $Icon4 = GUICtrlCreateIcon('', 0, 192, 24, 24, 24) GUICtrlSetImage(-1,@ScriptFullPath, -5) $Label1 = GUICtrlCreateLabel("64x64 48x48 32x32 24x24", 16, 88, 220, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndbut i also want to add some images like bmp,jpg,gif,etc in the resources to use in my application. i can not use fileInstall. thanks Link to comment Share on other sites More sharing options...
Zedna Posted November 10, 2008 Share Posted November 10, 2008 but i also want to add some images like bmp,jpg,gif,etc in the resources to use in my application. i can not use fileInstall. thanksThen use my resource UDF.Read whole my UDF topic carefully first! Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
Tlem Posted November 16, 2008 Share Posted November 16, 2008 (edited) Also, you can take a look here : Resource Dll GeneratorI just release this 1st version (hope that it can help someone).The code can probably be optimized or simplified, but the idea is there. I know that it is easier to have the resources of a highly-rated and the code of the other one.It avoids the heaviness of resources files. Edited November 16, 2008 by Tlem abberration 1 Best Regards.Thierry Link to comment Share on other sites More sharing options...
martin Posted November 17, 2008 Share Posted November 17, 2008 Also, you can take a look here : Resource Dll GeneratorI just release this 1st version (hope that it can help someone).The code can probably be optimized or simplified, but the idea is there. I know that it is easier to have the resources of a highly-rated and the code of the other one.It avoids the heaviness of resources files.Merci bien Thierry. 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...
Tlem Posted November 24, 2008 Share Posted November 24, 2008 (edited) I have updated my code to make only one exe that support English and French language. For those who want to add other languages, it is with pleasure that I would add them (edit the file RDG_Lang.au3 to add your language and send it to me).The source files can be downloaded from here.The compiled script with sources included in resource can be downloaded from here. Edited March 7, 2010 by Tlem Best Regards.Thierry 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