musicstashall
Знающий
- Сообщения
- 322
- Репутация
- 7
Пытаюсь освоить функцию, никак не пойму, в каком формате нужный цвет записать. Что бы я ни написал, всегда устанавливается, почему-то, зеленый))
Код:
Global Const $tagCOLORIZATIONPARAMS = 'dword Color;dword AftGlow;uint Intensity;uint AftGlowBal;uint BlurBal;uint GlassReflInt; uint Opaque'
$tCP = DllStructCreate($tagCOLORIZATIONPARAMS)
;$Ret = DllCall('dwmapi.dll', 'uint', 127, 'ptr', DllStructGetPtr($tCP))
DllStructSetData($tCP, 'Color', 0x00FF00) ; Set a new color
DllStructSetData($tCP, 'Intensity', -1) ; Set a new Intensity
DllStructSetData($tCP, 'Opaque', 0) ; Set a new Opaque
$Ret = DllCall('dwmapi.dll', 'uint', 131, 'ptr', DllStructGetPtr($tCP), 'uint', 0)
$Color = "4ff0000"
$Ret = DllCall('dwmapi.dll', 'uint', 'DwmGetColorizationParameters', 'ptr', DllStructGetPtr($tCP))
;If (@error) Or ($Ret[0]) Then
; Error
;EndIf
DllStructSetData($tCP, 'Color', $Color) ; Set a new color
$Ret = DllCall('dwmapi.dll', 'uint', 'DwmSetColorizationParameters', 'ptr', DllStructGetPtr($tCP), 'uint', 0)
;If (@error) Or ($Ret[0]) Then
; Error
;EndIf