MyEarth Posted May 22, 2015 Share Posted May 22, 2015 (edited) Reading the help, sometimes i'll do it for learn new things, i have see this function and the relative example:_WinAPI_CreateRoundRectRgnAnd i have think, if i want to make a circular GUI starting from a perfect square GUI like? What kind of math calculation need to do?Thanks for the help Edited May 22, 2015 by MyEarth Link to comment Share on other sites More sharing options...
UEZ Posted May 22, 2015 Share Posted May 22, 2015 There is no math needed:#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Global Const $iW = 800, $iH = 800 Global Const $hGUI = GUICreate("Round GUI", $iW, $iH, -1, -1, $WS_POPUP) GUISetBkColor(0x0) Global Const $hRegion = _WinAPI_CreateRoundRectRgn(0, 0, $iW, $iH, $iW, $iH) _WinAPI_SetWindowRgn($hGUI, $hRegion) Global Const $iBtn_X = GUICtrlCreateButton("Exit", ($iW - 50) / 2, ($iH - 50) / 2, 50, 50) GUISetState() Do Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $iBtn_X _WinAPI_DeleteObject($hRegion) GUIDelete() Exit EndSwitch Until False Gianni 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...
MyEarth Posted May 22, 2015 Author Share Posted May 22, 2015 (edited) UEZ thanks. Can i clean the resource in this way? There are drawback?_WinAPI_SetWindowRgn($hGUI, $hRegion)_WinAPI_DeleteObject($hRegion) ;<<<<Or i need to delete only when i close the GUI? Edited May 22, 2015 by MyEarth Link to comment Share on other sites More sharing options...
UEZ Posted May 22, 2015 Share Posted May 22, 2015 I would release the object on close to be on the safe side. 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...
BinaryBrother Posted May 22, 2015 Share Posted May 22, 2015 Here is what the above GUI would look like. SIGNATURE_0X800007D NOT FOUND 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