trancexx Posted September 8, 2013 Author Share Posted September 8, 2013 (edited) Andreik It would probably be:Func _MyUIApp_OnViewChanged($pSelf, $iViewId, $iTypeId, $pView, $iVerb, $iReason) #forceref $pSelf, $iViewId, $iTypeId, $pView, $iVerb, $iReason Local Static $g_pRibbon Switch $iVerb Case 0 ;UI_VIEWVERB_CREATE ConsoleWrite("UI_VIEWVERB_CREATE" & @CRLF) If Not IsObj($g_pRibbon) Then Local $oUnknown = ObjCreateInterface($pView, $sIID_IUnknown, "") $oUnknown.AddRef() Local $pRibbon $oUnknown.QueryInterface($sIID_IUIRibbon, $pRibbon) $g_pRibbon = ObjCreateInterface($pRibbon, $sIID_IUIRibbon, $tagIUIRibbon) EndIf Case 2 ;UI_VIEWVERB_SIZE ConsoleWrite("UI_VIEWVERB_SIZE" & @CRLF) Local $uRibbonHeight If IsObj($g_pRibbon) Then $g_pRibbon.GetHeight($uRibbonHeight) ConsoleWrite("$uRibbonHeight = " & $uRibbonHeight & @CRLF) EndSwitch Return 0 ; S_OK EndFunc Edited September 8, 2013 by trancexx Andreik 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Andreik Posted September 8, 2013 Share Posted September 8, 2013 (edited) Thank you it works but now I'm confused. Based on what it's calculated the height of the ribbon? I have a windows that cannot be resized and the ribbon is 146 px height on (readed in _MyUIApp_OnViewChange and with AutoIt Info Tool, same value no matter used machine) but on different machines, the appearance is not the same. LE: I forgot to mention how other controls are created. The controls are created at positions based on ribbon height + an offset. For example the most left label that surround the treeview it located at position 150 (146 ribbon height + 4px). Edited September 8, 2013 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
trancexx Posted September 8, 2013 Author Share Posted September 8, 2013 That looks to me as if the quick access toolbar (being right of the window's icon) of the ribbon was placed below the ribbon and then put above after the other controls have been created. In that case an offset of about 25px would have been created.Do you rearrange other controls every time OnViewChanged is called? You should. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Andreik Posted September 11, 2013 Share Posted September 11, 2013 Ok, let's say I rearrange all controls every time OnViewChange is called but how can I know how to rearrange them because I know just the ribbon actions: UI_VIEWVERB_CREATE, UI_VIEWVERB_SIZE. For example UI_VIEWVERB_SIZE is called when I minimize/restore the ribbon or when I set the quick access below or above the ribbon. When I minimize the ribbon, controls should be placed in a position different than when quick acees is placed below ribbon. Or maybe if it's possible I would like to remove these options. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
trancexx Posted September 11, 2013 Author Share Posted September 11, 2013 Don't remove them. They make ribbon what ribbon is.What do you mean you don't know how to rearrange the controls. Are we talking about the same controls? I'm talking about controls that you make in your gui - buttons, listviews, etc... ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Andreik Posted September 12, 2013 Share Posted September 12, 2013 Yes, about the controls used in my gui. If I choose to minimize the ribbon all my gui controls should be moved a little up but how can I know I choosed to minimize the ribbon and not to place the quick access bar below ribbon case when all my gui controls should be moved a little down. All I said it's both actions are trapped in OnViewChange with message UI_VIEWVERB_SIZE and no more informations about. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
trancexx Posted September 12, 2013 Author Share Posted September 12, 2013 Hm, I don't get it. Can you upload your files so that I can try.I have updated the first post with new/old example and I'm moving controls as ribbon moves there. Do you have problems with that script? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Andreik Posted September 12, 2013 Share Posted September 12, 2013 No I haven't and now I made my script to move well the controls. If you don't mind I would have one more question. When my gui is resizing to make enough space for all controls and gui it's big enough to get out of my screen I have a bad effect on my gui like in the image. I suppose it something related to used gui style. The style of window is: BitXOR($WS_OVERLAPPEDWINDOW,$WS_MINIMIZEBOX,$WS_MAXIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME) When the words fail... music speaks. Link to comment Share on other sites More sharing options...
trancexx Posted September 12, 2013 Author Share Posted September 12, 2013 AutoIt internally does lots of processing when you resize windows. If you don't care much about what AutoIt want to do with controls then you can register WM_SIZE and do youur own processing there when sizing happens. I'm doing that in my script. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Andreik Posted September 12, 2013 Share Posted September 12, 2013 I did it already but unfortunately this don't prevent this problem. Anyway thanks for your help, I'm pretty sure I'll find soon a solution for this problem. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
chrisser Posted December 17, 2014 Share Posted December 17, 2014 I did it already but unfortunately this don't prevent this problem. Anyway thanks for your help, I'm pretty sure I'll find soon a solution for this problem. Hello all / Andreik, i know it´s long ago, but I have now exactly the same problem. Do you find a solution for this problem? Link to comment Share on other sites More sharing options...
Andreik Posted December 17, 2014 Share Posted December 17, 2014 I didn't had too much time to analyze this problem so I don't have yet a solution. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
chrisser Posted December 18, 2014 Share Posted December 18, 2014 Thank you it works but now I'm confused. Based on what it's calculated the height of the ribbon? I have a windows that cannot be resized and the ribbon is 146 px height on (readed in _MyUIApp_OnViewChange and with AutoIt Info Tool, same value no matter used machine) but on different machines, the appearance is not the same. LE: I forgot to mention how other controls are created. The controls are created at positions based on ribbon height + an offset. For example the most left label that surround the treeview it located at position 150 (146 ribbon height + 4px). I found out the problem yesterday. The problem is the AERO-Style from Windows. If AERO is active, the controls are fitting perfect in the GUI. Link to comment Share on other sites More sharing options...
Andreik Posted October 19, 2015 Share Posted October 19, 2015 Have anyone an idea if it's possible to create dynamic the binary markup that is shown in example as ribress.dll? When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Andreik Posted August 17, 2016 Share Posted August 17, 2016 (edited) Looking through MSDN documentation I tried to create different groups of buttons with ControlGroup element but for some reason all my examples fail to compile except the example from MSDN. So I think I miss something but for some reason it's not obviously exactly what. Here is the MSDN XML markup: expandcollapse popup<Group CommandName="cmdSizeDefinitionsGroup" SizeDefinition="ButtonGroups"> <!-- Row 1 --> <ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton1" /> <Button CommandName="cmdSDButton2" /> <Button CommandName="cmdSDButton3" /> <Button CommandName="cmdSDButton4" /> <Button CommandName="cmdSDButton5" /> <Button CommandName="cmdSDButton6" /> <Button CommandName="cmdSDButton7" /> <Button CommandName="cmdSDButton8" /> <Button CommandName="cmdSDButton9" /> <Button CommandName="cmdSDButton10" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton11" /> <Button CommandName="cmdSDButton12" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton13" /> <Button CommandName="cmdSDButton14" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton15" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton16" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton17" /> <Button CommandName="cmdSDButton18" /> </ControlGroup> </ControlGroup> <!-- Row 2 --> <ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton19" /> <Button CommandName="cmdSDButton20" /> <Button CommandName="cmdSDButton21" /> <Button CommandName="cmdSDButton22" /> <Button CommandName="cmdSDButton23" /> <Button CommandName="cmdSDButton24" /> <Button CommandName="cmdSDButton25" /> <Button CommandName="cmdSDButton26" /> <Button CommandName="cmdSDButton27" /> <Button CommandName="cmdSDButton28" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton29" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton30" /> <Button CommandName="cmdSDButton31" /> </ControlGroup> </ControlGroup> <Button CommandName="cmdSDButton32" /> </Group> And this is the result: You can see how buttons from the first row are groups of 10, 2, 2, 1, 1, 2 buttons. Well if I try to group the buttons from the first line in groups of 10, 2, 2, 2, 2 then I need to put button15 and button16 in the same control group and the XML should look like below: expandcollapse popup<Group CommandName="cmdSizeDefinitionsGroup" SizeDefinition="ButtonGroups"> <!-- Row 1 --> <ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton1" /> <Button CommandName="cmdSDButton2" /> <Button CommandName="cmdSDButton3" /> <Button CommandName="cmdSDButton4" /> <Button CommandName="cmdSDButton5" /> <Button CommandName="cmdSDButton6" /> <Button CommandName="cmdSDButton7" /> <Button CommandName="cmdSDButton8" /> <Button CommandName="cmdSDButton9" /> <Button CommandName="cmdSDButton10" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton11" /> <Button CommandName="cmdSDButton12" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton13" /> <Button CommandName="cmdSDButton14" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton15" /> <Button CommandName="cmdSDButton16" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton17" /> <Button CommandName="cmdSDButton18" /> </ControlGroup> </ControlGroup> <!-- Row 2 --> <ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton19" /> <Button CommandName="cmdSDButton20" /> <Button CommandName="cmdSDButton21" /> <Button CommandName="cmdSDButton22" /> <Button CommandName="cmdSDButton23" /> <Button CommandName="cmdSDButton24" /> <Button CommandName="cmdSDButton25" /> <Button CommandName="cmdSDButton26" /> <Button CommandName="cmdSDButton27" /> <Button CommandName="cmdSDButton28" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton29" /> </ControlGroup> <ControlGroup> <Button CommandName="cmdSDButton30" /> <Button CommandName="cmdSDButton31" /> </ControlGroup> </ControlGroup> <Button CommandName="cmdSDButton32" /> </Group> And when I try to compile I got this errors: error SC1032 : Group contains too many controls for the chosen SizeDefinition. error SC1032 : Group contains too many controls for the chosen SizeDefinition. error SC1012 : Unable to determine mapping of elements for Group to SizeDefinition 'ButtonGroups'. error SC1009 : Unable to apply Group.SizeDefinition property 'ButtonGroups'. These errors makes no sense for me since I didn't add anything to group so I still have 32 buttons but in another configuration. Any help is appreciated. Edited August 17, 2016 by Andreik typo When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Mugen Posted November 14, 2020 Share Posted November 14, 2020 Does anyone still have VRC or know another tool to edit UIFILE resource? Link to comment Share on other sites More sharing options...
mumpel Posted August 30, 2023 Share Posted August 30, 2023 On 5/3/2011 at 9:29 AM, taietel said: UEZ, download the free version of VRC from here and make a custom one. Trancexx, thanks! 5* Translated from German with Google Translator Hello! Actually, you don't dig up old threads. But this thread is the only one on the internet dealing with the ribbon in AutoIt. Unfortunately, the VRC site is no longer active. Can someone make the program available here, or know of an alternative to it? Thanks! Greetings, Rene Link to comment Share on other sites More sharing options...
UEZ Posted August 30, 2023 Share Posted August 30, 2023 You can download the RibRes.dll from here: RibRes.7z mumpel 1 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
argumentum Posted August 30, 2023 Share Posted August 30, 2023 (edited) ..the old exe from way back then. ( I believe that he's looking for this ) Edit: for what I see this zip will be there for 14 days only. Edited August 30, 2023 by argumentum oops Mugen and mumpel 1 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
mumpel Posted August 30, 2023 Share Posted August 30, 2023 30 minutes ago, argumentum said: I believe that he's looking for this Yes. Thanks! First I have to install the C++ compiler and the Windows 7 SDK. I hope the SDK runs on Windows 11. 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