Popular Post trancexx Posted May 3, 2011 Popular Post Posted May 3, 2011 (edited) Few years ago Microsoft introduced new UI feature that they named Ribbon.With the release of Windows 7 they added it as standard system feature. Windows Ribbon framework.You could say it's a new technology waiting to be fully embraced. Considering AutoIt is currently in some shitty stage Ribbons are not expected to be supported natively. Which is actually good thing because otherwise some developer could have GUICtrlCreateRibbon idiotic idea.Ribbons are beautiful things. In order to work with them you have to master objects. It's COM based technology. Some people will stop reading now, but really their shame.Anyway, this example is based on work by Mr. Michael Chourdakis. Guy really took deeper dive to ribbon thematic and made few very interesting articles. All is available on internet naturally, just google Michael Chourdakis Ribbon or something like that.So, the main thing to do is create so called Ribbon Framework Object. After that you have to initialize event handlers (two callback objects made with ObjectFromTag function) and load your Ribbon.Ribbon is loaded from resource, either one of your app or some other. I have compiled resource dll for this example so that scripts could be run non-compiled and still use ribbon command bar.Example shown here is not completely dummy, it uses all of the ribbon controls. Only it doesn't do anything smart besides that.ZIP:Ribbon.zipInside the zip there is folder called Ribbon with two files RibbonExample_NEW.au3 and RibRes.dll. Extract that folder somewhere, run RibbonExample_NEW.au3 and enjoy the Ribbon beauty.There are few comments inline for easier comprehension of the overall script code.Thanks Andreik for asking for more. Edited September 12, 2013 by trancexx Mugen, Andreik, scintilla4evr and 4 others 7 ♡♡♡ . eMyvnE
UEZ Posted May 3, 2011 Posted May 3, 2011 Very nice work trancexx! 5* from me! What about RibRes.dll? Where is it from? Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
jvanegmond Posted May 3, 2011 Posted May 3, 2011 (edited) I thought the major benefit of ribbons was that they natively supported resizing of controls. Example in my Excel program:Is this functionality supported? If so, will you write a demo using this technique?I'm also having huge repaint issues with the GUI, mostly when resizing. Example: http://gyazo.com/7b3e742d70d5abab2519be627e1f898c.png I haven't done any debugging yet. Can you give me some pointers? Edited May 3, 2011 by Manadar github.com/jvanegmond
taietel Posted May 3, 2011 Posted May 3, 2011 (edited) UEZ, download the free version of VRC from here and make a custom one. Trancexx, thanks! 5* Edited May 3, 2011 by taietel Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text
UEZ Posted May 3, 2011 Posted May 3, 2011 @taietel: ahh, I see now what is behind the DLL. Thanks, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
ptrex Posted May 3, 2011 Posted May 3, 2011 @trancexx .... I am still reading ... This is a great addition to au3 ! To resolve to Gui repaint issue (partially) add this GUIRegisterMsg(0xF, "MY_PAINT"); Register PAINT-Event ... Func WM_ERASEBKGND($hWnd, $msg, $wParam, $lParam) Return 1 EndFunc ;==>MY_PAINT Ps : "I am still a COM fan, don't get me wrong, but there is more in life the COM alone" Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
James Posted May 3, 2011 Posted May 3, 2011 Hah! That's neat. I love it! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
jvanegmond Posted May 3, 2011 Posted May 3, 2011 GUIRegisterMsg(0xF, "MY_PAINT"); Register PAINT-Event ... Func WM_ERASEBKGND($hWnd, $msg, $wParam, $lParam) Return 1 EndFunc ;==>MY_PAINT Did you mean to do this? GUIRegisterMsg(0x0014, "WM_ERASEBKGND") Func WM_ERASEBKGND($hWnd, $msg, $wParam, $lParam) Return 1 EndFunc Because it solves repaint issues with the ribbon very nicely, just not the rest. http://gyazo.com/b431e13c8f318cce022389d0c097da68.png github.com/jvanegmond
Yashied Posted May 3, 2011 Posted May 3, 2011 Nice. Five stars from me too. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
trancexx Posted May 3, 2011 Author Posted May 3, 2011 I thought the major benefit of ribbons was that they natively supported resizing of controls. Example in my Excel program:Is this functionality supported? If so, will you write a demo using this technique?I'm also having huge repaint issues with the GUI, mostly when resizing. Example: http://gyazo.com/7b3e742d70d5abab2519be627e1f898c.png I haven't done any debugging yet. Can you give me some pointers?I'm not sure but probably OnViewChanged method of UIApplication is where that can be adjusted.All the examples I had in c++ have had WS_CLIPCHILDREN style added for the main GUI. If that's added to AutoIt's GUI then overriding of some windows massaging would be in place too I guess.I lol'd on pointers. ♡♡♡ . eMyvnE
UEZ Posted May 3, 2011 Posted May 3, 2011 (edited) Did you mean to do this? GUIRegisterMsg(0x0014, "WM_ERASEBKGND") Func WM_ERASEBKGND($hWnd, $msg, $wParam, $lParam) Return 1 EndFunc Because it solves repaint issues with the ribbon very nicely, just not the rest. http://gyazo.com/b431e13c8f318cce022389d0c097da68.png This is better but not perfect (tested on Win7 x64 with Aero): GUIRegisterMsg($WM_NOTIFY, "ReDraw") Func ReDraw($hWnd, $msg, $wParam, $lParam) _WinAPI_RedrawWindow($hGUI, 0, 0, BitOR($RDW_ALLCHILDREN, $RDW_UPDATENOW, $RDW_INVALIDATE, $RDW_INTERNALPAINT)) Return "GUI_RUNDEFMSG" EndFunc Maybe some styles needs to be added which I don't know yet. Br, UEZ Edited May 3, 2011 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
JScript Posted May 3, 2011 Posted May 3, 2011 Wow, great! Five stars ***** Questions: It only works if I use AutoItObject? It depends on Net Framework? What minimal version? Will always have this DLL? Thanks for sharing!!! http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
trancexx Posted May 3, 2011 Author Posted May 3, 2011 Wow, great! Five stars *****Questions:It only works if I use AutoItObject?It depends on Net Framework? What minimal version?Will always have this DLL?Thanks for sharing!!!Yes, code works thanks to AutoItObject. The only mayor dependency is operating system.DLL is there to serve as resource holder. It can be any other PE module, or none if ribbon resource is added to your compiled script. ♡♡♡ . eMyvnE
JScript Posted May 3, 2011 Posted May 3, 2011 Thanks for your reply... And about "Application button"? http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
Andreik Posted July 13, 2013 Posted July 13, 2013 How could I create the resource file for a custom application? Should I install Visual Studio for Ribbon Designer?
trancexx Posted July 14, 2013 Author Posted July 14, 2013 How could I create the resource file for a custom application? Should I install Visual Studio for Ribbon Designer?I used Visual Ribbon Creator by Michael Chourdakis. Digisoul 1 ♡♡♡ . eMyvnE
Andreik Posted July 23, 2013 Posted July 23, 2013 Can you tell me please what you did to work properly. I tried Visual Ribbon Creator by Michael Chourdakis and as he said I installed VS 2010, I am able to generate C++ code but the application fail to compile DLL.
spudw2k Posted July 24, 2013 Posted July 24, 2013 (edited) Forgive the dumb nature of my post;is the download of the Autoit Object package required. I assumed the AutoItObject.au3 script included in the zip was all I needed but are there other dependencies nedded in the AIO package? I only ask because I don't get what I expected when I run the example (plain GUI with a button and textbox) and I am unable to download the package from my current location do to firewall rules. edit: spelling and grammar Edited July 24, 2013 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
trancexx Posted July 24, 2013 Author Posted July 24, 2013 Can you tell me please what you did to work properly. I tried Visual Ribbon Creator by Michael Chourdakis and as he said I installed VS 2010, I am able to generate C++ code but the application fail to compile DLL.Nothing particularly smart if I remember correctly. It was easy task.I'm running Windows 8 with VS 2012 so I can't help much further, sorry. @spudw2k, what's your system? ♡♡♡ . eMyvnE
spudw2k Posted July 24, 2013 Posted July 24, 2013 Win7 x64 SP1 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
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