mesale0077 Posted May 28, 2010 Posted May 28, 2010 hi #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("[#] Form1 [#]", 633, 447, 192, 124) $Label1 = GUICtrlCreateLabel("Autoit team", 40, 112, 57, 17) how is vertical label ?or flip label control ? $Progress1 = GUICtrlCreateProgress(104, 192, 177, 49, BitOR($PBS_SMOOTH,$PBS_VERTICAL))like it ($PBS_VERTICAL) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd thank you for help me
UEZ Posted May 28, 2010 Posted May 28, 2010 (edited) Here a routine made by BugFix (I put it to a function):expandcollapse popup;Thanks to BugFix Func Display_Rotated_Text($hGUI, $text, $px, $py, $angle = 90, $tw = 400, $th = 12, $tcolor = 0x000000, $bcolor = 0xF0F0F0, $font = 'Arial', $transparent = True) Local $tRect, $rotate, $RotateMe, $rFont, $hDC ; Create RECT-structure, fill data $tRect = DllStructCreate ($tagRECT) DllStructSetData ($tRect, 'Left', $px) DllStructSetData ($tRect, 'Top', $py) ; Set rotation $rotate = $angle * 10 ; Create structure for rotate text, fill data $RotateMe = DllStructCreate ($tagLOGFONT) DllStructSetData ($RotateMe, 'Escapement', $rotate) DllStructSetData ($RotateMe, 'Weight', $tw) DllStructSetData ($RotateMe, 'Height', $th) DllStructSetData ($RotateMe, 'FaceName', $font) ; Creates a logical font that has specific characteristics $rFont = _WinAPI_CreateFontIndirect ($RotateMe) ; Retrieves a handle of a display device context for the client area a window $hDC = _WinAPI_GetDC ($hGUI) ; Set text- and back color _WinAPI_SetTextColor ($hDC, $tcolor) _WinAPI_SetBkColor ($hDC, $bcolor) If $transparent Then _WinAPI_SetBkMode($hDC, $TRANSPARENT) ; Selects an object into the specified device context _WinAPI_SelectObject ($hdc, $rFont) ; Draws formatted text in the specified rectangle _WinAPI_DrawText ($hDC, $text, $tRect, $DT_NOCLIP + $DT_NOPREFIX) $tRect = 0 EndFuncExample:expandcollapse popup#include <GDIplus.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("[#] Form1 [#]", 633, 447, 192, 124) $Label1 = GUICtrlCreateLabel("Autoit team", 40, 112, 57, 17) $Progress1 = GUICtrlCreateProgress(104, 192, 177, 49, BitOR($PBS_SMOOTH,$PBS_VERTICAL)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Display_Rotated_Text($Form1, "Autoit team", 40, 260, 90, 400, 24) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Display_Rotated_Text($hGUI, $text, $px, $py, $angle = 90, $tw = 400, $th = 12, $tcolor = 0x000000, $bcolor = 0xF0F0F0, $font = 'Arial', $transparent = True) Local $tRect, $rotate, $RotateMe, $rFont, $hDC ; Create RECT-structure, fill data $tRect = DllStructCreate ($tagRECT) DllStructSetData ($tRect, 'Left', $px) DllStructSetData ($tRect, 'Top', $py) ; Set rotation $rotate = $angle * 10 ; Create structure for rotate text, fill data $RotateMe = DllStructCreate ($tagLOGFONT) DllStructSetData ($RotateMe, 'Escapement', $rotate) DllStructSetData ($RotateMe, 'Weight', $tw) DllStructSetData ($RotateMe, 'Height', $th) DllStructSetData ($RotateMe, 'FaceName', $font) ; Creates a logical font that has specific characteristics $rFont = _WinAPI_CreateFontIndirect ($RotateMe) ; Retrieves a handle of a display device context for the client area a window $hDC = _WinAPI_GetDC ($hGUI) ; Set text- and back color _WinAPI_SetTextColor ($hDC, $tcolor) _WinAPI_SetBkColor ($hDC, $bcolor) If $transparent Then _WinAPI_SetBkMode($hDC, $TRANSPARENT) ; Selects an object into the specified device context _WinAPI_SelectObject ($hdc, $rFont) ; Draws formatted text in the specified rectangle _WinAPI_DrawText ($hDC, $text, $tRect, $DT_NOCLIP + $DT_NOPREFIX) $tRect = 0 EndFuncAnother example here -> Fussball Chronograph (German only!)BR,UEZ Edited May 28, 2010 by UEZ PlayHD and DinFuv 2 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
mesale0077 Posted May 29, 2010 Author Posted May 29, 2010 UEZ ,thank you for this code and Thanks to BugFix
PlayHD Posted April 16, 2013 Posted April 16, 2013 Here a routine made by BugFix (I put it to a function): expandcollapse popup;Thanks to BugFix Func Display_Rotated_Text($hGUI, $text, $px, $py, $angle = 90, $tw = 400, $th = 12, $tcolor = 0x000000, $bcolor = 0xF0F0F0, $font = 'Arial', $transparent = True) Local $tRect, $rotate, $RotateMe, $rFont, $hDC ; Create RECT-structure, fill data $tRect = DllStructCreate ($tagRECT) DllStructSetData ($tRect, 'Left', $px) DllStructSetData ($tRect, 'Top', $py) ; Set rotation $rotate = $angle * 10 ; Create structure for rotate text, fill data $RotateMe = DllStructCreate ($tagLOGFONT) DllStructSetData ($RotateMe, 'Escapement', $rotate) DllStructSetData ($RotateMe, 'Weight', $tw) DllStructSetData ($RotateMe, 'Height', $th) DllStructSetData ($RotateMe, 'FaceName', $font) ; Creates a logical font that has specific characteristics $rFont = _WinAPI_CreateFontIndirect ($RotateMe) ; Retrieves a handle of a display device context for the client area a window $hDC = _WinAPI_GetDC ($hGUI) ; Set text- and back color _WinAPI_SetTextColor ($hDC, $tcolor) _WinAPI_SetBkColor ($hDC, $bcolor) If $transparent Then _WinAPI_SetBkMode($hDC, $TRANSPARENT) ; Selects an object into the specified device context _WinAPI_SelectObject ($hdc, $rFont) ; Draws formatted text in the specified rectangle _WinAPI_DrawText ($hDC, $text, $tRect, $DT_NOCLIP + $DT_NOPREFIX) $tRect = 0 EndFunc Example: expandcollapse popup#include <GDIplus.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("[#] Form1 [#]", 633, 447, 192, 124) $Label1 = GUICtrlCreateLabel("Autoit team", 40, 112, 57, 17) $Progress1 = GUICtrlCreateProgress(104, 192, 177, 49, BitOR($PBS_SMOOTH,$PBS_VERTICAL)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Display_Rotated_Text($Form1, "Autoit team", 40, 260, 90, 400, 24) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Display_Rotated_Text($hGUI, $text, $px, $py, $angle = 90, $tw = 400, $th = 12, $tcolor = 0x000000, $bcolor = 0xF0F0F0, $font = 'Arial', $transparent = True) Local $tRect, $rotate, $RotateMe, $rFont, $hDC ; Create RECT-structure, fill data $tRect = DllStructCreate ($tagRECT) DllStructSetData ($tRect, 'Left', $px) DllStructSetData ($tRect, 'Top', $py) ; Set rotation $rotate = $angle * 10 ; Create structure for rotate text, fill data $RotateMe = DllStructCreate ($tagLOGFONT) DllStructSetData ($RotateMe, 'Escapement', $rotate) DllStructSetData ($RotateMe, 'Weight', $tw) DllStructSetData ($RotateMe, 'Height', $th) DllStructSetData ($RotateMe, 'FaceName', $font) ; Creates a logical font that has specific characteristics $rFont = _WinAPI_CreateFontIndirect ($RotateMe) ; Retrieves a handle of a display device context for the client area a window $hDC = _WinAPI_GetDC ($hGUI) ; Set text- and back color _WinAPI_SetTextColor ($hDC, $tcolor) _WinAPI_SetBkColor ($hDC, $bcolor) If $transparent Then _WinAPI_SetBkMode($hDC, $TRANSPARENT) ; Selects an object into the specified device context _WinAPI_SelectObject ($hdc, $rFont) ; Draws formatted text in the specified rectangle _WinAPI_DrawText ($hDC, $text, $tRect, $DT_NOCLIP + $DT_NOPREFIX) $tRect = 0 EndFunc Another example here -> Fussball Chronograph (German only!) BR, UEZ and if you want to modify text later? My UDF : _WinShake, _WinSplitMy Apps : Google Guitar Bot, PuzzleGameDesign Gui : Interesting Tabs Design, RBox Project (abandoned), Animated Gui on Exit
FireFox Posted April 16, 2013 Posted April 16, 2013 Hi, _WinAPI_RedrawWindow($hGUI) Br, FireFox. PlayHD 1
PlayHD Posted April 16, 2013 Posted April 16, 2013 Hi, _WinAPI_RedrawWindow($hGUI) Br, FireFox. Thank you My UDF : _WinShake, _WinSplitMy Apps : Google Guitar Bot, PuzzleGameDesign Gui : Interesting Tabs Design, RBox Project (abandoned), Animated Gui on Exit
FireFox Posted April 16, 2013 Posted April 16, 2013 (edited) You're welcome. PS: Please only quote what's useful to point out for your answer, we know what's written above (Refer to the post #4) Edited April 16, 2013 by FireFox
UEZ Posted April 16, 2013 Posted April 16, 2013 Something like this here? expandcollapse popup#include <GDIplus.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("[#] Form1 [#]", 633, 447, 192, 124, Default, $WS_EX_COMPOSITED) $Label1 = GUICtrlCreateLabel("Autoit team", 40, 112, 57, 17) $Progress1 = GUICtrlCreateProgress(104, 192, 177, 49, BitOR($PBS_SMOOTH, $PBS_VERTICAL)) GUICtrlSetData($Progress1, 50) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### Global $iBGColor = _WinAPI_GetSysColor($COLOR_3DFACE) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $iBGColor = ' & Hex($iBGColor) & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console Global $iCounter = 0 GUIRegisterMsg(0x000F, "WM_PAINT") ;$WM_PAINT = 0x000F AdlibRegister("Counter", 250) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE AdlibUnRegister("Counter") GUIRegisterMsg(0x000F, "") Exit EndSwitch WEnd Func Counter() $iCounter += 1 _WinAPI_RedrawWindow($Form1, 0, 0, $RDW_INVALIDATE + $RDW_UPDATENOW) EndFunc ;==>Counter Func WM_PAINT() Display_Rotated_Text($Form1, "Autoit team " & $iCounter, 40, 300, 90, 400, 24, 0, $iBGColor) Return "GUI_RUNDEFMSG" EndFunc ;==>WM_PAINT Func Display_Rotated_Text($hGUI, $text, $px, $py, $angle = 90, $tw = 400, $th = 12, $tcolor = 0x000000, $bcolor = 0xF0F0F0, $font = 'Arial', $transparent = False) Local $tRect, $rotate, $RotateMe, $rFont, $hDC ; Create RECT-structure, fill data $tRect = DllStructCreate($tagRECT) DllStructSetData($tRect, 'Left', $px) DllStructSetData($tRect, 'Top', $py) ; Set rotation $rotate = $angle * 10 ; Create structure for rotate text, fill data $RotateMe = DllStructCreate($tagLOGFONT) DllStructSetData($RotateMe, 'Escapement', $rotate) DllStructSetData($RotateMe, 'Weight', $tw) DllStructSetData($RotateMe, 'Height', $th) DllStructSetData($RotateMe, 'FaceName', $font) DllStructSetData($RotateMe, 'Quality', 5) ; Creates a logical font that has specific characteristics $rFont = _WinAPI_CreateFontIndirect($RotateMe) ; Retrieves a handle of a display device context for the client area a window $hDC = _WinAPI_GetDC($hGUI) ; Set text- and back color _WinAPI_SetTextColor($hDC, $tcolor) _WinAPI_SetBkColor($hDC, $bcolor) If $transparent Then _WinAPI_SetBkMode($hDC, $transparent) ; Selects an object into the specified device context _WinAPI_SelectObject($hDC, $rFont) ; Draws formatted text in the specified rectangle _WinAPI_DrawText($hDC, $text, $tRect, $DT_NOCLIP + $DT_NOPREFIX) $tRect = 0 EndFunc ;==>Display_Rotated_Text Br, UEZ mLipok 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
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