während es unter Windows 7 noch funktionierte
funktioniert es seit Windows 10 nicht mehr.
Hat jemand eine Ahnung warum? Hat M$ etwas verschlimmbessert?
Code: Select all
; GLOBAL SETTINGS ===============================================================================================================
#NoEnv
#SingleInstance Force
SetBatchLines -1
; GUI ===========================================================================================================================
Gui, +LastFound +hwndhMyGUI
Gui, Margin, 0, 0
Gui, Add, Pic, x+0 y+0 w400 h25 0x4E hwndhPic01
CreateGradient(hPic01, "3399FF|3399FF|CC33FF|CC33FF", 2, 2, 400, 25, 1)
Gui, Show, w400 h300, % "GUI Concept"
return
; FUNCTIONS =====================================================================================================================
CreateGradient(handle, PixelData, W, H, ResizeW := 0, ResizeH := 0, Gradient := 1) ; by SKAN | modified by jNizM
{
WB := Ceil((W * 3) / 2) * 2, VarSetCapacity(BMBITS, WB * H + 1, 0), P := &BMBITS
loop, parse, PixelData, |
P := Numput("0x" A_LoopField, P+0, 0, "uint") - (W & 1 && Mod(A_Index * 3, W * 3) = 0 ? 0 : 1)
hBitmap := DllCall("gdi32\CreateBitmap", "int", W, "int", H, "uint", 1, "uint", 24, "ptr", 0, "ptr")
hBM := DllCall("user32\CopyImage", "ptr", hBitmap, "uint", 0, "int", 0, "int", 0, "uint", 0x2008, "ptr")
DllCall("gdi32\SetBitmapBits", "ptr", hBM, "uint", WB * H, "ptr", &BMBITS)
if !(Gradient+0)
hBM := DllCall("user32\CopyImage", "ptr", hBM, "uint", 0, "int", 0, "int", 0, "uint", 0x0008, "ptr")
hBM := DllCall("user32\CopyImage", "ptr", hBM, "int", 0, "int", ResizeW, "int", ResizeH, "uint", 0x200C, "ptr")
DllCall("user32\SendMessage", "ptr", handle, "uint", 0x0172, "ptr", 0, "ptr", hBM, "ptr")
return True, DllCall("gdi32\DeleteObject", "ptr", hBitmap)
}
; EXIT ==========================================================================================================================
GuiClose:
GuiEscape:
ExitApp