Показать полную графическую версию : Как сделать прозрачный фон для надписи в GUICtrlCreateGroup?
МИШАНЧИК
14-11-2011, 17:04
Подскажите пожалуйста, возможно ли при создании GUICtrlCreateGroup наложеной на картинку, сделать так чтоб надпись "Установка" была на прозрачном фоне? Т.е. надпись распологалась прям на картинке, а не на белом фоне?
$Group1 = GUICtrlCreateGroup("Установка", 8, 8, 352, 95)
GUICtrlSetFont(-1, 9, 400, 0, "Segoe UI")
Если можно пример как это сделать. Заранее большое спасибо.
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <GUIConstantsEx.au3>
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <WinAPI.au3>
Dim (http://www.autoitscript.com/autoit3/docs/keywords.htm#Dim) $W_HEIGHT = 300, $W_WIDTH = 500, $TITLE = "Graphic Edge Demo"
$MAIN_WINDOW = GUICreate (http://www.autoitscript.com/autoit3/docs/functions/GUICreate.htm)($TITLE, $W_WIDTH, $W_HEIGHT)
GUICtrlCreatePic (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreatePic.htm)(@SystemDir (http://www.autoitscript.com/autoit3/docs/macros.htm#@systemdir) & "\oobe\images\mslogo.jpg", 20, 20, 200, 50)
$hctrl = _GUICtrlCreateGroupBox("My Group", 25, 25, 2, 190, 40)
GUICtrlSetColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetColor.htm)($hctrl, 0xFF0000)
$nEXIT = GUICtrlCreateButton (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateButton.htm)("E&xit", 310, $W_HEIGHT - 40, 120, 25)
GUISetState (http://www.autoitscript.com/autoit3/docs/functions/GUISetState.htm)(@SW_SHOW (http://www.autoitscript.com/autoit3/docs/macros.htm#@sw_show), $MAIN_WINDOW)
While (http://www.autoitscript.com/autoit3/docs/keywords.htm#While) 1
Switch (http://www.autoitscript.com/autoit3/docs/keywords.htm#Switch) GUIGetMsg (http://www.autoitscript.com/autoit3/docs/functions/GUIGetMsg.htm)()
Case (http://www.autoitscript.com/autoit3/docs/keywords.htm#Case) $nEXIT, $GUI_EVENT_CLOSE
ExitLoop (http://www.autoitscript.com/autoit3/docs/keywords.htm#ExitLoop)
EndSwitch (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndSwitch)
WEnd (http://www.autoitscript.com/autoit3/docs/keywords.htm#WEnd)
;===============================================================================
;
; Description: _GUICtrlCreateEdge "Create an edge line from a label"
; Parameter(s): $i_x - left
; $i_y - top
; $i_width - width
; $i_height - height
; $v_color - color
; Requirement: none
; Return Value(s): none
; User CallTip: none
; Author(s): layer
; Note(s): all the following were inspired by this simple function
;
;===============================================================================
Func (http://www.autoitscript.com/autoit3/docs/keywords.htm#Func) _GUICtrlCreateEdge($i_x, $i_y, $i_width, $i_height, $v_color)
GUICtrlCreateGraphic (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateGraphic.htm)($i_x, $i_y, $i_width, $i_height, 0x1000)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $v_color)
EndFunc (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndFunc) ;==>_GUICtrlCreateEdge
;===============================================================================
;
; Description: _GUICtrlCreateEdgeBox
; Parameter(s): $i_x - left
; $i_y - top
; $i_weight - line weight
; $i_width - width
; $i_height - height
; $v_color - color
; Requirement: GUICtrlCreateEdge
; Return Value(s): none
; User CallTip: none
; Author(s): Gary Frost (gary.frost@arnold.af.mil)
; Note(s):
;
;===============================================================================
Func (http://www.autoitscript.com/autoit3/docs/keywords.htm#Func) _GUICtrlCreateEdgeBox($i_x, $i_y, $i_weight, $i_width, $i_height, $v_color)
; left vertical line
_GUICtrlCreateEdge($i_x, $i_y, $i_weight, $i_height, $v_color)
; top horizontal line
_GUICtrlCreateEdge($i_x, $i_y, $i_width, $i_weight, $v_color)
; right vertical line
_GUICtrlCreateEdge($i_width + $i_x - 1, $i_y, $i_weight, $i_height, $v_color)
; bottom horizontal line
_GUICtrlCreateEdge($i_x, $i_height + $i_y - 1, $i_width + $i_weight - 1, $i_weight, $v_color)
EndFunc (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndFunc) ;==>_GUICtrlCreateEdgeBox
Func (http://www.autoitscript.com/autoit3/docs/keywords.htm#Func) _GUICtrlCreateGroupBox($sText, $i_x, $i_y, $i_weight, $i_width, $i_height, $v_color = -1)
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $hdc = _WinAPI_GetDC (http://dundats.mvps.org/help/html/libfunctions/_winapi_getdc.htm)(0)
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $tSize = _WinAPI_GetTextExtentPoint32 (http://dundats.mvps.org/help/html/libfunctions/_winapi_gettextextentpoint32.htm)($hdc, $sText)
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) ($v_color == -1) Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then) $v_color = 0x000000
; left vertical line
_GUICtrlCreateEdge($i_x, $i_y, $i_weight, $i_height, $v_color)
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $h_ctlid = GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)($sText, $i_x + 4, $i_y - (DllStructGetData (http://www.autoitscript.com/autoit3/docs/functions/DllStructGetData.htm)($tSize, "Y") / 2))
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $GUI_BKCOLOR_TRANSPARENT)
; top horizontal line
_GUICtrlCreateEdge($i_x + DllStructGetData (http://www.autoitscript.com/autoit3/docs/functions/DllStructGetData.htm)($tSize, "X") - 4, $i_y, $i_width - DllStructGetData (http://www.autoitscript.com/autoit3/docs/functions/DllStructGetData.htm)($tSize, "X") + 4, $i_weight, $v_color)
; right vertical line
_GUICtrlCreateEdge($i_width + $i_x - 1, $i_y, $i_weight, $i_height, $v_color)
; bottom horizontal line
_GUICtrlCreateEdge($i_x, $i_height + $i_y - 1, $i_width + $i_weight - 1, $i_weight, $v_color)
Return (http://www.autoitscript.com/autoit3/docs/keywords.htm#Return) $h_ctlid
EndFunc (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndFunc) ;==>_GUICtrlCreateGroupBox
МИШАНЧИК
15-11-2011, 04:08
Creat0R, большое спасибо, но я так понимаю что в этом скрипте Вы полностью создаёте горизонтальные и вертикальные линии(подобие линий в GUICtrlCreateGroup)? А нельзя всё-таки как нибудь просто задать прозрачность надписи в стандартной GUICtrlCreateGroup?
А нельзя всё-таки как нибудь просто задать прозрачность надписи в стандартной GUICtrlCreateGroup? »
Не думаю.
Я ещё часто использую вот такие самопальные Group:
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <GUIConstantsEx.au3>
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <StaticConstants.au3>
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <WindowsConstants.au3>
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <WinAPI.au3>
$sImage = @WindowsDir (http://www.autoitscript.com/autoit3/docs/macros.htm#@windowsdir) & "\Web\Wallpaper\Windows XP.jpg"
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) @OSVersion (http://www.autoitscript.com/autoit3/docs/macros.htm#@osversion) = "WIN_7" Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then) $sImage = @WindowsDir (http://www.autoitscript.com/autoit3/docs/macros.htm#@windowsdir) & "\Web\Wallpaper\Windows\img0.jpg"
GUICreate (http://www.autoitscript.com/autoit3/docs/functions/GUICreate.htm)("My GUI", 300, 200)
$pic = GUICtrlCreatePic (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreatePic.htm)($sImage, 0, 0, 300, 200)
GUICtrlSetState (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetState.htm)(-1, $GUI_DISABLE)
$group = _GUICtrlCreateGroupEx("Group1", 10, 10, 280, 180, 3, 0x00FF00, 1)
GUICtrlCreateGroup (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateGroup.htm)("", -99, -99, 1, 1)
GUISetState (http://www.autoitscript.com/autoit3/docs/functions/GUISetState.htm)()
While (http://www.autoitscript.com/autoit3/docs/keywords.htm#While) 1
Switch (http://www.autoitscript.com/autoit3/docs/keywords.htm#Switch) GUIGetMsg (http://www.autoitscript.com/autoit3/docs/functions/GUIGetMsg.htm)()
Case (http://www.autoitscript.com/autoit3/docs/keywords.htm#Case) $GUI_EVENT_CLOSE
ExitLoop (http://www.autoitscript.com/autoit3/docs/keywords.htm#ExitLoop)
EndSwitch (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndSwitch)
WEnd (http://www.autoitscript.com/autoit3/docs/keywords.htm#WEnd)
Func (http://www.autoitscript.com/autoit3/docs/keywords.htm#Func) _GUICtrlCreateGroupEx($sText, $iLeft, $iTop, $iWidth, $iHeight, $iLineWidth = 3, $nColor = 0, $iStyle = 0)
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $aIDs[2] ;First + Last IDs
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $nLabel_Style = $SS_ETCHEDFRAME
;1 to able set color for the Group frame
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) $iStyle > 0 Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then) $nLabel_Style = $SS_SUNKEN
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $hDC = _WinAPI_GetDC (http://dundats.mvps.org/help/html/libfunctions/_winapi_getdc.htm)(GUICtrlGetHandle (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlGetHandle.htm)(GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)($sText, -100, -100)))
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $stExtPoint = _WinAPI_GetTextExtentPoint32 (http://dundats.mvps.org/help/html/libfunctions/_winapi_gettextextentpoint32.htm)($hDC, $sText)
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $iExtPoint_X = DllStructGetData (http://www.autoitscript.com/autoit3/docs/functions/DllStructGetData.htm)($stExtPoint, "X") - StringLen (http://www.autoitscript.com/autoit3/docs/functions/StringLen.htm)($sText) + 5
GUIStartGroup (http://www.autoitscript.com/autoit3/docs/functions/GUIStartGroup.htm)()
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) $sText <> '' Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then)
$aIDs[0] = GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 1, $iTop, 35, $iLineWidth, $nLabel_Style)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 35 + $iExtPoint_X, $iTop, $iWidth - 35 - $iExtPoint_X, $iLineWidth, $nLabel_Style)
Else (http://www.autoitscript.com/autoit3/docs/keywords.htm#Else)
$aIDs[0] = GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 1, $iTop, $iWidth - 2, $iLineWidth, $nLabel_Style)
EndIf (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 2, $iTop + 5, $iLineWidth, $iHeight - 4, $nLabel_Style)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', ($iLeft + $iWidth), $iTop - 3, $iLineWidth, $iHeight - 3, $nLabel_Style)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
$aIDs[1] = GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 6, ($iTop + $iHeight) - 5, $iWidth, $iLineWidth, $nLabel_Style)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) $sText <> '' Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then)
$aIDs[1] = GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)(' ' & $sText, $iLeft + 35, $iTop - 6)
GUICtrlSetColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetColor.htm)(-1, $nColor)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $GUI_BKCOLOR_TRANSPARENT)
EndIf (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf)
Return (http://www.autoitscript.com/autoit3/docs/keywords.htm#Return) $aIDs
EndFunc (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndFunc)
МИШАНЧИК
16-11-2011, 01:47
Creat0R, подскажите пожалуйста, когда создаем изображение
GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 20, 20, 200, 50)
рисунок должен находится в соответствующей директории, а нельзя сделать чтоб рисунок после компиляции распологался в исполняемом файле и брался оттуда?
madmasles
16-11-2011, 02:38
МИШАНЧИК,
FAQ по использованию ресурсов в AutoIt (http://autoit-script.ru/index.php/topic,2849.0.html)
а нельзя сделать чтоб рисунок после компиляции распологался в исполняемом файле и брался оттуда? »
Если сильно не заморачиваться, я бы предложил использовать FileInstall:
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <GUIConstantsEx.au3>
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <StaticConstants.au3>
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <WindowsConstants.au3>
#include (http://www.autoitscript.com/autoit3/docs/keywords.htm##include) <WinAPI.au3>
FileChangeDir (http://www.autoitscript.com/autoit3/docs/functions/FileChangeDir.htm)(@ScriptDir (http://www.autoitscript.com/autoit3/docs/macros.htm#@scriptdir))
$sImage = @TempDir (http://www.autoitscript.com/autoit3/docs/macros.htm#@tempdir) & "\Image.jpg"
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) Not (http://www.autoitscript.com/autoit3/docs/keywords.htm#Not) @Compiled (http://www.autoitscript.com/autoit3/docs/macros.htm#@compiled) And (http://www.autoitscript.com/autoit3/docs/keywords.htm#And) Not (http://www.autoitscript.com/autoit3/docs/keywords.htm#Not) FileExists (http://www.autoitscript.com/autoit3/docs/functions/FileExists.htm)("Image.jpg") Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then) InetGet (http://www.autoitscript.com/autoit3/docs/functions/InetGet.htm)("http://img.flyinglobsters.com/wall/src/124227199686.jpg", "Image.jpg", 1, 0)
FileInstall (http://www.autoitscript.com/autoit3/docs/functions/FileInstall.htm)("Image.jpg", $sImage, 1)
GUICreate (http://www.autoitscript.com/autoit3/docs/functions/GUICreate.htm)("My GUI", 300, 200)
$pic = GUICtrlCreatePic (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreatePic.htm)($sImage, 0, 0, 300, 200)
GUICtrlSetState (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetState.htm)(-1, $GUI_DISABLE)
$group = _GUICtrlCreateGroupEx("Group1", 10, 10, 280, 180, 3, 0xFF0000, 1)
GUICtrlCreateGroup (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateGroup.htm)("", -99, -99, 1, 1)
GUISetState (http://www.autoitscript.com/autoit3/docs/functions/GUISetState.htm)(@SW_SHOW (http://www.autoitscript.com/autoit3/docs/macros.htm#@sw_show))
While (http://www.autoitscript.com/autoit3/docs/keywords.htm#While) 1
Switch (http://www.autoitscript.com/autoit3/docs/keywords.htm#Switch) GUIGetMsg (http://www.autoitscript.com/autoit3/docs/functions/GUIGetMsg.htm)()
Case (http://www.autoitscript.com/autoit3/docs/keywords.htm#Case) $GUI_EVENT_CLOSE
ExitLoop (http://www.autoitscript.com/autoit3/docs/keywords.htm#ExitLoop)
EndSwitch (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndSwitch)
WEnd (http://www.autoitscript.com/autoit3/docs/keywords.htm#WEnd)
Func (http://www.autoitscript.com/autoit3/docs/keywords.htm#Func) _GUICtrlCreateGroupEx($sText, $iLeft, $iTop, $iWidth, $iHeight, $iLineWidth = 3, $nColor = 0, $iStyle = 0)
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $aIDs[2] ;First + Last IDs
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $nLabel_Style = $SS_ETCHEDFRAME
;1 to able set color for the Group frame
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) $iStyle > 0 Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then) $nLabel_Style = $SS_SUNKEN
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $hDC = _WinAPI_GetDC (http://dundats.mvps.org/help/html/libfunctions/_winapi_getdc.htm)(GUICtrlGetHandle (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlGetHandle.htm)(GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)($sText, -100, -100)))
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $stExtPoint = _WinAPI_GetTextExtentPoint32 (http://dundats.mvps.org/help/html/libfunctions/_winapi_gettextextentpoint32.htm)($hDC, $sText)
Local (http://www.autoitscript.com/autoit3/docs/keywords.htm#Local) $iExtPoint_X = DllStructGetData (http://www.autoitscript.com/autoit3/docs/functions/DllStructGetData.htm)($stExtPoint, "X") - StringLen (http://www.autoitscript.com/autoit3/docs/functions/StringLen.htm)($sText) + 5
GUIStartGroup (http://www.autoitscript.com/autoit3/docs/functions/GUIStartGroup.htm)()
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) $sText <> '' Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then)
$aIDs[0] = GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 1, $iTop, 35, $iLineWidth, $nLabel_Style)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 35 + $iExtPoint_X, $iTop, $iWidth - 35 - $iExtPoint_X, $iLineWidth, $nLabel_Style)
Else (http://www.autoitscript.com/autoit3/docs/keywords.htm#Else)
$aIDs[0] = GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 1, $iTop, $iWidth - 2, $iLineWidth, $nLabel_Style)
EndIf (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 2, $iTop + 5, $iLineWidth, $iHeight - 4, $nLabel_Style)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', ($iLeft + $iWidth), $iTop - 3, $iLineWidth, $iHeight - 3, $nLabel_Style)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
$aIDs[1] = GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)('', $iLeft + 6, ($iTop + $iHeight) - 5, $iWidth, $iLineWidth, $nLabel_Style)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $nColor)
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) $sText <> '' Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then)
$aIDs[1] = GUICtrlCreateLabel (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm)(' ' & $sText, $iLeft + 35, $iTop - 6)
GUICtrlSetColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetColor.htm)(-1, $nColor)
GUICtrlSetBkColor (http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetBkColor.htm)(-1, $GUI_BKCOLOR_TRANSPARENT)
EndIf (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf)
Return (http://www.autoitscript.com/autoit3/docs/keywords.htm#Return) $aIDs
EndFunc (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndFunc)
А нельзя всё-таки как нибудь просто задать прозрачность надписи в стандартной GUICtrlCreateGroup?
Рисуешь по слоям:
Картинка + Пустой Group + Кусок нижней картинки со смещением на месте текста + Текст
© OSzone.net 2001-2012
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.