GaryFrost Posted June 13, 2005 Share Posted June 13, 2005 (edited) Thought some might be interested in this: Test Script #include <GuiConstants.au3> $my_gui = GuiCreate("MyGUI", 392, 323) _GuiRoundCorners($my_gui, 0, 0, 50, 50) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Function to round the corners of a window: Func _GuiRoundCorners($h_win, $i_x1, $i_y1, $i_x3, $i_y3) Dim $pos, $ret, $ret2 $pos = WinGetPos($h_win) $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $i_x1, "long", $i_y1, "long", $pos[2], "long", $pos[3], "long", $i_x3, "long", $i_y3) If $ret[0] Then $ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $ret[0], "int", 1) If $ret2[0] Then Return 1 Else Return 0 EndIf Else Return 0 EndIf EndFunc ;==>_GuiRoundCorners Edited June 13, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
buzz44 Posted June 13, 2005 Share Posted June 13, 2005 *Very cool*. I'm using this one already. Yet another useful function from gafrost . qq Link to comment Share on other sites More sharing options...
Josbe Posted June 13, 2005 Share Posted June 13, 2005 Interesting. Some days ago, I was looking something like this, to work with regions, that it offers nice possibilities for windows. Nice example. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Mosquitos Posted June 13, 2005 Share Posted June 13, 2005 Wow cool Next month we can maybe make something like this batman skin from mediaplayer Sapiente vince, rex, noli vincere ferro! Link to comment Share on other sites More sharing options...
blindwig Posted June 13, 2005 Share Posted June 13, 2005 Wow cool Next month we can maybe make something like this batman skin from mediaplayer <{POST_SNAPBACK}>I think you should be able to do that, based on gafrost's example. Just use multiple regions (using SetWindowRgn) until you get evreything that you want masked off. I haven't done this with AutoIt, but I remember writing a VB to do this a while back. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
strate Posted March 14, 2006 Share Posted March 14, 2006 When this is used it creates a different GUI style that doesn't look the same as XP theme. Is it possible to change this? I love this function and want to use really bad. Thought some might be interested in this: Test Script #include <GuiConstants.au3> $my_gui = GuiCreate("MyGUI", 392, 323) _GuiRoundCorners($my_gui, 0, 0, 50, 50) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Function to round the corners of a window: Func _GuiRoundCorners($h_win, $i_x1, $i_y1, $i_x3, $i_y3) Dim $pos, $ret, $ret2 $pos = WinGetPos($h_win) $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $i_x1, "long", $i_y1, "long", $pos[2], "long", $pos[3], "long", $i_x3, "long", $i_y3) If $ret[0] Then $ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $ret[0], "int", 1) If $ret2[0] Then Return 1 Else Return 0 EndIf Else Return 0 EndIf EndFunc ;==>_GuiRoundCorners INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
ConsultingJoe Posted March 14, 2006 Share Posted March 14, 2006 When this is used it creates a different GUI style that doesn't look the same as XP theme. Is it possible to change this? I love this function and want to use really bad.Very cool, if only someone made a UDF of all the possible GUI FX, I use user32.dll that does transitions. I don't know much about how to use dllcall but how do you guys find out what dll and how to call it. Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
rakudave Posted March 14, 2006 Share Posted March 14, 2006 ultracool - i love it, thanks 4 sharing! Pangaea Ruler new, UDF: _GUICtrlCreateContainer(), Pangaea Desktops, Pangaea Notepad, SuDoku, UDF: Table Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 14, 2006 Share Posted March 14, 2006 (edited) ultracool - i love it, thanks 4 sharing!Very nice, I´ll have to look at DLL Calls. That stuff seems to be very mighty. So long,Mega Edited March 14, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
theguy0000 Posted March 15, 2006 Share Posted March 15, 2006 why is it in the Windows Classic Style? Very cool UDF though The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 15, 2006 Share Posted March 15, 2006 why is it in the Windows Classic Style?Very cool UDF thoughsame for me.. but this is way cool! i hope there is possibility of completly chainging the interface.. csutom colors.. Link to comment Share on other sites More sharing options...
theguy0000 Posted March 15, 2006 Share Posted March 15, 2006 I was able to round a normal window (the windows was SCiTE...) without making it Windows Classic style, so why is the gui in that style? The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
theguy0000 Posted March 18, 2006 Share Posted March 18, 2006 int SetWindowRgn( HWND hWnd, HRGN hRgn, BOOL bRedraw ); what do you use for hRgn? The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
FuryCell Posted March 19, 2006 Share Posted March 19, 2006 Very cool but is there a way to make it use the xp style? HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. 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