Knight Posted December 6, 2005 Share Posted December 6, 2005 (edited) I am unable to add treeview items to a created treeview. Is it a bug or am I doing something wrong? It creates the treeview box, but I am unable to create treeview items.#include <anygui.au3> $GUI = GuiCreate("MyGUI", 464, 420,(@DesktopWidth-464)/2, (@DesktopHeight-400)/2) GUISetState() $target = _GuiTarget ($GUI) $Tree = _TargetaddTreeView(250, 5, 200, 240, -1, $WS_EX_CLIENTEDGE, $target) $1 = GUICtrlCreateTreeViewItem("Head", $Tree) GUISetState() While 1 WEndEDIT 1: hmm.. It seems to work if I use "-1" instead of targetting the variable storing the treeview. The problem is I have a complex treeview that will need to place the things under the right headers, and -1 won't do that.EDIT 2: OK, after looking at the functions code, I realized that in order to target the created treeview, I must use $Tree[0] rather then $Tree.FIXED!Thanks -JKnight Edited December 6, 2005 by Knight Link to comment Share on other sites More sharing options...
sfranzyshen Posted February 2, 2006 Share Posted February 2, 2006 Hi All! I have been playing around with AnyGui and it is awesome. There is only one thing I find missing. That is some way to overlay (overlapping) controls. Letting you put a control ontop of another control. The only way to do this is to change the z-order of the controls. Just our luck that win32 api ties the z-order of controls (the z axis) to the tab order of the controls. So all we need to do is change the tab order of the controls and we change the z-order also. Here is the code: I modified my copy of AnyGUIv2.6's _TargetaddChild function to change the z-order (of the child just created) after the GUICreate function is called. Like this Func _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $LocTargethWnd = 0); Const $HWND_TOP = 0 If not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a = GUICreate($text, $SizeX, $SizeY, $PosX, $PosY, $WS_CHILD, -1, $TargethWnd) If $a = 0 Then SetError(1) Return $a Else DLLCall ( "user32.dll", "long", "SetWindowPOS", "hwnd", $a, "hwnd", $HWND_TOP, "int", 0, "int", 0, "int", 0, "int", 0, "long", BitOR ( $SWP_NOMOVE, $SWP_NOSIZE )) Return $a EndFunc ;==>_TargetaddChild Now, when ever I create a control, it shows up ontop HOWEVER! most software will refresh the window (and z-order)after a maximize, or minimize. So, your code will need to be called after these actions so that the z-order can be re-modified. I am working on creating the following functions to make the coding easier. _GUICtrlSetOnTop() _GUICtrlSendUp() _GUICtrlSendDown() I will post them once I am finished. Thanks sfranzyshen Link to comment Share on other sites More sharing options...
Dizzy Posted February 2, 2006 Share Posted February 2, 2006 Hi sfranzyshen,this sounds great! Can you show us your new functions with an example in excel? Here is a liite script (thanks to ptrex : link --> http://www.autoitscript.com/forum/index.ph...7&hl=_guitarget ) to get on with it.--> German Excel <-- please replace the title !!expandcollapse popup#include <ANYGUI.au3> #include <guiconstants.au3> Opt("WinTitleMatchMode", 4) Opt("GUIOnEventMode", 1) $appWindow = WinGetHandle("classname=XLMAIN") $handle = ControlGetHandle("classname=XLMAIN", "", "EXCEL22") ;MsgBox(0,"",$handle) $Targetwindow = _GuiTarget($appWindow,"","",$handle) $btn = _TargetaddButton ( "Test Button", 800, 25, 80, 30,"","",$Targetwindow); GUICtrlSetOnEvent($btn[0], "Clicked") GUISetState(@SW_SHOW) _EndTarget() ;WinActivate("Microsoft Excel - Mappe1", "") $handle = ControlGetHandle("classname=XLMAIN", "", "XLDESK1") $Targetwindow = _GuiTarget($appWindow,"","",$handle) GUISetState(@SW_SHOW) _EndTarget() ;WinSetState("Microsoft Excel - Mappe1", "", @SW_ENABLE) ;ControlFocus("Microsoft Excel - Mappe1", "", "XLDESK1") MsgBox(0,"Help Window","Just to get the focus back",2) ;Send ("^G") ;Send ("F5") ;Send ("{ENTER}") While WinExists($Targetwindow) Sleep(100) If Not WinExists($Targetwindow) Then Exit EndIf WEnd Func Clicked() MsgBox(0,"TEST","OK") EndFuncCan you replace a control??? GreetsDizzy Link to comment Share on other sites More sharing options...
sfranzyshen Posted February 2, 2006 Share Posted February 2, 2006 Hi sfranzyshen, this sounds great! Can you show us your new functions with an example in excel? Here is a liite script (thanks to ptrex : link --> http://www.autoitscript.com/forum/index.ph...7&hl=_guitarget ) to get on with it. "404: The page/file you requested could not be found." That link is broken --> German Excel <-- please replace the title !! #include <ANYGUI.au3> #include <guiconstants.au3> Opt("WinTitleMatchMode", 4) Opt("GUIOnEventMode", 1) .. blah blah .. I do not have Excel installed, so I am not sure what you are doing here ... If you make the change to you AnyGUI, it may just simply work! (I'm not realy sure what you want or are trying to do here?) But, if you modify your AnyGui in the way I showed, ANY control you create, will be placed at the top most layer of the z-order. In other words, the newley created control (any control created with the _Targetadd* functions from AnyGui) will be placed ontop anything else in the targeted window (assuming the control(s) you want to overlay are set with the style WS_TABSTOP.) Can you replace a control??? You can already replace a control. Just Hide it, then create a new control in it's place. I use this where I can not just hide the control. For instance, a toolbar. I do not want to replace the entire toolbar, Just one button of it. So, I fire up this little change and I am able to OVERLAY my control(s) ontop of an existing control(s). Thanks sfranzyshen Link to comment Share on other sites More sharing options...
Adam1213 Posted February 6, 2006 Share Posted February 6, 2006 Its really good, the notepad example should be at the start. IRC Client - 75 pages 3728 lines. Blob crumbler (game)Backup (drag to backup + cmd line)RS232 Link to comment Share on other sites More sharing options...
quaizywabbit Posted February 6, 2006 Author Share Posted February 6, 2006 Hi All! I have been playing around with AnyGui and it is awesome. There is only one thing I find missing. That is some way to overlay (overlapping) controls. Letting you put a control ontop of another control. The only way to do this is to change the z-order of the controls. Just our luck that win32 api ties the z-order of controls (the z axis) to the tab order of the controls. So all we need to do is change the tab order of the controls and we change the z-order also. Here is the code: I modified my copy of AnyGUIv2.6's _TargetaddChild function to change the z-order (of the child just created) after the GUICreate function is called. Like this Func _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $LocTargethWnd = 0); Const $HWND_TOP = 0 If not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a = GUICreate($text, $SizeX, $SizeY, $PosX, $PosY, $WS_CHILD, -1, $TargethWnd) If $a = 0 Then SetError(1) Return $a Else DLLCall ( "user32.dll", "long", "SetWindowPOS", "hwnd", $a, "hwnd", $HWND_TOP, "int", 0, "int", 0, "int", 0, "int", 0, "long", BitOR ( $SWP_NOMOVE, $SWP_NOSIZE )) Return $a EndFunc ;==>_TargetaddChild Now, when ever I create a control, it shows up ontop HOWEVER! most software will refresh the window (and z-order)after a maximize, or minimize. So, your code will need to be called after these actions so that the z-order can be re-modified. I am working on creating the following functions to make the coding easier. _GUICtrlSetOnTop() _GUICtrlSendUp() _GUICtrlSendDown() I will post them once I am finished. Thanks sfranzyshen I'll be more than happy to add these z-order functions to 2.7 when you get them figured out....nice work! [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
sfranzyshen Posted February 8, 2006 Share Posted February 8, 2006 Hi Me Again! Ok, I have created two examples below. The first examples shows how to "REPLACE" a control completly (Hide it, then create a new one). The Second example shows how to "PUT ON TOP" a control on top of an existing control. The second example also contains the "_GUICtrlSetOnTop( )" function that can be added to AnyGUI. Replace an existing control example: #include <guiconstants.au3> #include <anyguiv2.6.au3>; z-order modified ;from Winuser.h (maybe shuold be placed into an include file some where) Const $HWND_TOP = 0 Const $HWND_BOTTOM = 1 Const $SWP_NOMOVE = 0x0002 Const $SWP_NOSIZE = 0x0001 Run ( "calc" ) WinWait ( "Calculator" ) $Pos = WinGetPos ( "Calculator" ) WinMove ( "Calculator", "", (@DesktopWidth-$Pos[2])/2, (@DesktopHeight-$Pos[3])/2 ) ControlHide ( "Calculator", '', "Static1" ); Hide the control we want to replace _GuiTarget ( "Calculator", 1 ); target the window $Quit = _TargetAddButton ( "Quit", 8, 37, 36, 29 ); add a button where the previous control was $Quit = $Quit[0] GUISetState ( @SW_SHOW ); reset GUI While 1 $msg = GUIGetMsg ( ) If $msg = $Quit Then Exit If Not WinExists ( "Calculator" ) Then Exit wEnd Func OnAutoItExit() ProcessClose ( "calc.exe" ) EndFunc On-TOP an existing control example: expandcollapse popup#include <guiconstants.au3> #include <anyguiv2.6.au3>; z-order modified ;from Winuser.h (These should be moved to a include) Const $HWND_TOP = 0 Const $HWND_BOTTOM = 1 Const $SWP_NOMOVE = 0x0002 Const $SWP_NOSIZE = 0x0001 ;other Const $GW_HWNDPREV = 3 Const $GW_HWNDNEXT = 2 Const $GW_HWNDLAST = 1 Const $GW_HWNDFIRST = 0 Run ( "mspaint" ); run an app WinWait ( "untitled - Paint" ); wait for app $Pos = WinGetPos ( "untitled - Paint" ); get default potision of app's window WinMove ( "untitled - Paint", '', (@DesktopWidth-$Pos[2])/2, (@DesktopHeight-$Pos[3])/2, 462, 425 ); move the app to the center on the desktop _GuiTarget ( "untitled - Paint", 1 ); target the GUI of the app $Quit = _TargetAddButton ( "Quit", 3, 180, 50, 25, BitOr($WS_CHILD, $WS_VISIBLE, $WS_TABSTOP) ); create new control on app $GUI = $Quit[2]; save the handle of the AutoIt GUI (child) for later updating $Quit = $Quit[0]; save the controlid of the newley created button GUICtrlSetTip ( -1, "Quit Paint Now!" ); set the tool tip for the newley created button _GUICtrlSetOnTop( $GUI ); we need to call this after creating the button in applications that have controls with no ; current tab order set, in other applications that have tab orders, we do not need to call ; this function unless the screen gets redrawn and we need to update (redraw) our control GUISetState ( @SW_SHOW ); refresh GUI While 1; loop and wait for button press $msg = GUIGetMsg ( ) If $msg = $Quit Then Exit If Not WinExists ( "untitled - Paint" ) Then Exit wEnd Func OnAutoItExit() ProcessClose ( "mspaint.exe" ) EndFunc Func _GUICtrlSetOnTop( $HWND ) DllCall("user32.dll", "long", "SetWindowPos", "hwnd", $HWND, "hwnd", $HWND_TOP, "int", 0, "int", 0, "int", 0, "int", 0, "long", BitOR($SWP_NOMOVE, $SWP_NOSIZE )) GUISetState ( @SW_SHOW ) EndFunc quaizywabbit: Feb 6 2006, 04:33 PM - I'll be more than happy to add these z-order functions to 2.7 when you get them figured out....nice work! Thanks! I will be posting everything I figure out here ... you (or everyone) are welcome to do with it what ever you would like Hope this helps ya! I am next looking at menus. Anyone got some good links to WIN32 API menu programming? I would like to hide, add, modify application menus. Anyone else? It's got to be possible. quaizywabbit's _WinMenuGetHandle() function looks like a good start! I would also like to interact with parts of controls (custome or API) for instance, the ability to click on just part of a toolbar, or change an edit control within parent control?? Thanks sfranzyshen Link to comment Share on other sites More sharing options...
sfranzyshen Posted February 8, 2006 Share Posted February 8, 2006 Replace an existing control example:CLEARIFY: In these example, you do not need to change anything in you AnyGUI.au3 file.The #include statement may have been missleading ... no change is need in either case ...The change that was made to AnyGUI.au3 changed the way the targetaddchild was called.Simply the same call made in the _GUICtrlSetOnTop() function. So, you can do the samething simply by using an unchanged AnyGUI.au3 include file, call a targetadd function, and then call the _GUICtrlSetOnTop() function (as shown above.)Thankssfranzyshen Link to comment Share on other sites More sharing options...
ptrex Posted February 9, 2006 Share Posted February 9, 2006 @sfranzyshen Nice addition !! I vote for incorporating this in AnyGui. The coordinates in your first example where not correct (at least when I ran it). This is better. $Quit = _TargetAddButton ( "Quit", 185, 62, 26, 27 ); Keep up the good work !! 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 Link to comment Share on other sites More sharing options...
sfranzyshen Posted February 13, 2006 Share Posted February 13, 2006 Button Text & Background colors! Another problem I have is when I add a control to an app's window, the control dosn't match the UI of the rest of the application. Perfect example of this is the calculator example I posted that added a button to the UI of the calc app, but the button's text color didn't match the rest of the app's UI. Color changes to buttons within AutoIt is in my opion "Broken". However, there is light at the end of the tunnel. The GUIRegisterMsg function has been quietly added to the AutoIt beta version. What this NEW function does is allow us to hook window/control messages. Allowing us to catch the WM_DRAWITEM message and proccess it ourselves. An excelent example is included in the help examples called GUIRegisterMsg.au3. I have stripped this file into two files. The first file is an #include file that contains just the functions and defines. The second file contains the MY_WM_DRAWITEM functions that I included into the calulator example here. expandcollapse popup#include <guiconstants.au3> #include <anyguiv2.6.au3> #include <_GUIRegisterMsg.au3> Const $HWND_TOP = 0 Const $HWND_BOTTOM = 1 Const $SWP_NOMOVE = 0x0002 Const $SWP_NOSIZE = 0x0001 Run ( "calc" ) WinWait ( "Calculator" ) $Pos = WinGetPos ( "Calculator" ) WinMove ( "Calculator", "", (@DesktopWidth-$Pos[2])/2, (@DesktopHeight-$Pos[3])/2 ) ControlHide ( "Calculator", '', "Static1" ); Hide the control we want to replace _GuiTarget ( "Calculator", 1 ); target the window $Quit = _TargetAddButton ( "Quit", 8, 37, 36, 29 ); add a button where the previous control was $Quit = $Quit[0] GUICtrlSetStyle($Quit, BitOr($WS_TABSTOP, $BS_NOTIFY, $BS_OWNERDRAW)); Set the ownerdrawn flag GUIRegisterMsg($WM_DRAWITEM, "MY_WM_DRAWITEM") GUISetState ( @SW_SHOW ); reset GUI While 1 $msg = GUIGetMsg ( ) If $msg = $Quit Then Exit If Not WinExists ( "Calculator" ) Then Exit wEnd Func OnAutoItExit() ProcessClose ( "calc.exe" ) EndFunc ; Draw the button Func MY_WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam) Local $stDrawItem = DllStructCreate("uint;uint;uint;uint;uint;uint;uint;int[4];dword", $lParam) $nCtlType = DllStructGetData($stDrawItem, 1) If $nCtlType = $ODT_BUTTON Then $nCtrlID = DllStructGetData($stDrawItem, 2) $nItemState = DllStructGetData($stDrawItem, 5) $hCtrl = DllStructGetData($stDrawItem, 6) $hDC = DllStructGetData($stDrawItem, 7) $nLeft = DllStructGetData($stDrawItem, 8, 1) $nTop = DllStructGetData($stDrawItem, 8, 2) $nRight = DllStructGetData($stDrawItem, 8, 3) $nBottom = DllStructGetData($stDrawItem, 8, 4) $sText = "Quit" $nTextColor = 0x0000ff $nBackColor = 0xced3d6 ;0xD6D3CE DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor) $stDrawItem = 0 Return 1 EndIf $stDrawItem = 0 Return $GUI_RUNDEFMSG; Proceed the default Autoit3 internal message commands EndFunc Place the attached file "_GUIRegisterMsg.au3" into your include folder. then run the above code BTW: I have been trying to get my _GUICtrlSetOnBottom() function working ... but it wont. So I only offer the _GUICtrlSetOnTop() function as an addition to AnyGUI. You can still accomplish all kinds of z-order changes with this one function. It will work on GUI added controls or existing controls. If you want a control to move down the z-order, just set another control ontop of it. Thanks sfranzyshen_GUIRegisterMsg.au3 Link to comment Share on other sites More sharing options...
NELyon Posted June 25, 2006 Share Posted June 25, 2006 hm... i tried to use this code: #include <ANYGUIv2.6.au3> _GUItarget("Untitled - notepad") _Targetaddbutton("text", 50, 50, 50, 50) But it says "Error reading file GUIConstants.au3" Link to comment Share on other sites More sharing options...
jvetter713 Posted July 31, 2006 Share Posted July 31, 2006 How can I code button click events and other messages after I have dropped a control onto an external app? Here is my code: #include <ANYGUI.au3> #include <guiconstants.au3> $Targetwindow = _GuiTarget ("Form2", 1); mode 1 set so all '_Targetadd(s) go to this window $btn1 = _TargetaddButton ( "Button1", 30, 100, 100, 50); GUISetState(@SW_SHOW); While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btn1 msgBox(4096, "", "Preparing") ;Button1_Click() EndSelect Sleep(50) WEnd ;Func Button1_Click() ;MsgBox(4096, "", "Button1 Clicked") ;EndFunc I am never getting into Case $msg = $btn1 Link to comment Share on other sites More sharing options...
JohnBailey Posted February 20, 2007 Share Posted February 20, 2007 What am I doing wrong? #include"./Include/OClassANYGUI.au3" #include <guiconstants.au3> _GuiTarget("Untitled - Notepad") _TargetaddCheckbox("Test", 50, 50, 150, 30) A decision is a powerful thing Link to comment Share on other sites More sharing options...
quaizywabbit Posted February 21, 2007 Author Share Posted February 21, 2007 (edited) What am I doing wrong? #include"./Include/OClassANYGUI.au3" #include <guiconstants.au3> _GuiTarget("Untitled - Notepad") _TargetaddCheckbox("Test", 50, 50, 150, 30)oÝ÷ Ûú®¢×ºÚ"µÍÚ[ÛYH ÙÝZXÛÛÝ[Ë]LÉÝÂÚ[ÛYH ÐSQÕR]]LÉÝÂ[ ][ÝÛÝY^I][ÝÊBÛY L BÚ[Ù]Ý]J ][ÝÕ[]YHÝY ][ÝË ][ÝÉ][ÝËÕ×ÓPVSRVJBÌÍÝÙ]HÑÝZUÙ] ][ÝÕ[]YHÝY ][ÝÊBÌÍÝÙ]ÝHÑÝZUÙ] ÌÍÝÙ]K ][ÝÉ][ÝËMJBÐÛÛÛ[ÝJ ÌÍÝÙ] ][ÝÉ][ÝËMK L NÜÚ^HY]HÛÛÛÛÈ]][È]ÂÌÍÛ^XÚXÚØÞHHÕÙ]YÚXÚØÞ ][ÝÕÝ ][ÝË L LMLÌLKLK ÌÍÝÙ]Ý NÂÉÌÍÛ^XÚXÚØÞVÌHÈÛÛÛY ÌÍÛ^XÚXÚØÞVÌWHÈÛÛÛÛ ÌÍÛ^XÚXÚØÞVÌHÈÚ[Ú[ÝÂÕRTÙ]Ý]JÕ×ÔÒÕÊBÚ[HÚ[^ÝÊ ÌÍÝÙ] B ÌÍÛÙÈHÕRQÙ]ÙÊJBÙ[XÝØÙH ÌÍÛÙÖÌHH ÌÍÛ^XÚXÚØÞVÌBY]S ÕRPÝXY ÌÍÛ^XÚXÚØÞVÌJK ÌÍÑÕRWÐÒPÒÑQ H[ÛÛÛÙ]^ ÌÍÝÙ] ][ÝÉ][ÝË ÌÍÝÙ]Ý ][ÝÐÚXÚÙY ][ÝÊB[YY]S ÕRPÝXY ÌÍÛ^XÚXÚØÞVÌJK ÌÍÑÕRWÕSÒPÒÑQ H[ÛÛÛÙ]^ ÌÍÝÙ] ][ÝÉ][ÝË ÌÍÝÙ]Ý ][ÝÕ[ÚXÚÙY ][ÝÊB[YØÙH ÌÍÛÙÖÌHH ÌÍÑÕRWÑUSÐÓÔÑB^]ØÙHÝÚ[^ÝÊ ÌÍÝÙ] B^][Ù[XÝÑ[ I myself haven't used this in quite awhile, so i had to re-read it again. Hope this helps..... Edited February 21, 2007 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
erix Posted February 21, 2007 Share Posted February 21, 2007 We must have to resize the edit control, can't we have the button on the top of the edit control ? Thanks Link to comment Share on other sites More sharing options...
JohnBailey Posted February 21, 2007 Share Posted February 21, 2007 (edited) quaizywabbit, thank you! This makes me feel like I actually own my computer! Seriously great idea! Lots of explanation points, but all of them were used purposefully. I will study what you wrote. Thanks again Edit: Spelling Edited February 21, 2007 by JohnBailey A decision is a powerful thing Link to comment Share on other sites More sharing options...
quaizywabbit Posted February 22, 2007 Author Share Posted February 22, 2007 (edited) ANYGUIv2.7 released today.....added _TargetAddDraglist() to the lineup and uncommented previous beta-only functions.edited above Notepad example to demonstrate#include <ANYGUIv2.7.au3> Run("notepad.exe") Sleep(1000) WinSetState("Untitled - Notepad", "", @SW_MAXIMIZE) $targetctl = _GuiTarget ("Untitled - Notepad", 1, "", 15) $btnhide = _TargetAddButton("Hide", 300,400, 100, 100,-1,-1, $targetctl) GUISetState(@SW_SHOW) $btnshow = _TargetAddButton("Show", 400,400, 100, 100,-1,-1, $targetctl) GUISetState(@SW_SHOW) $mydraglist = _TargetAddDraglist ("", 50, 60, 250, 100, $WS_VSCROLL, -1, $targetctl); GUICtrlSetData($mydraglist[0], "you|me|them|us|cool|shit|maynerd|damn|fuck|wow|bitchin|yada|nada|oh yeah") ;$mycheckbox1[0] is controlid: $mycheckbox1[1] is control hwnd: $mycheckbox1[2] is child window GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $btnhide[0] GUISetState(@SW_HIDE, $mydraglist[2]) Case $msg = $btnshow[0] GUISetState(@SW_SHOW, $mydraglist[2]) Case $msg = $GUI_EVENT_CLOSE Exit Case Not WinExists($targetctl) Exit EndSelect WEndsee 1st post to download newest version, or click on ANYGUIv2.7 in my signature Edited February 22, 2007 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
erix Posted February 23, 2007 Share Posted February 23, 2007 Hello, Can we add a button in the title bar of a Window with ANYGUI. ? I haven't found yet Thanks Link to comment Share on other sites More sharing options...
quaizywabbit Posted February 23, 2007 Author Share Posted February 23, 2007 Yes, I believe you can. Since control placement is based on the client area, I think you need to use Negative values in the Y(vertical) axis. [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
erix Posted February 23, 2007 Share Posted February 23, 2007 Yes, I believe you can. Since control placement is based on the client area, I think you need to use Negative values in the Y(vertical) axis.Yes but in this case the button is under the title bar.Is there a way to put it on the top ?Thanks 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