23.09.2025, 01:50 AM
Ok, thanks for confirming, was wondering if it had anything to do with the outdated PB includes vs Jose's.
I did make a few attempts last night without success, including an SDK version thinking maybe DDT engine failure but the behavior was the same.
Seems your Thor hammer approach would be the fix.
I did make a few attempts last night without success, including an SDK version thinking maybe DDT engine failure but the behavior was the same.
Code:
CASE %WM_SIZE
' Reapply layered attributes for resize (not needed for max/restore as handled in WM_SYSCOMMAND)
SetWindowLong CB.HNDL, %GWL_EXSTYLE, GetWindowLong(CB.HNDL, %GWL_EXSTYLE) OR %WS_EX_LAYERED
SetLayeredWindowAttributes CB.HNDL, keyColor, 0, %LWA_COLORKEY
InvalidateRect CB.HNDL, BYVAL %NULL, %TRUE
CASE %WM_SYSCOMMAND
LOCAL cmd AS LONG
cmd = CB.WPARAM AND &HFFF0
IF cmd = %SC_MAXIMIZE THEN
'-disable layered before maximize to see if layered is the culprit
SetWindowLong CB.HNDL, %GWL_EXSTYLE, GetWindowLong(CB.HNDL, %GWL_EXSTYLE) AND NOT %WS_EX_LAYERED
END IF
'-let Windows handle the command
FUNCTION = DefWindowProc(CB.HNDL, CB.MSG, CB.WPARAM, CB.LPARAM)
IF cmd = %SC_RESTORE THEN
'->re-enable layered after restore
SetWindowLong CB.HNDL, %GWL_EXSTYLE, GetWindowLong(CB.HNDL, %GWL_EXSTYLE) OR %WS_EX_LAYERED
SetLayeredWindowAttributes CB.HNDL, keyColor, 0, %LWA_COLORKEY
'-force full redraw including non-client
SetWindowPos CB.HNDL, 0, 0, 0, 0, 0, %SWP_NOMOVE OR %SWP_NOSIZE OR %SWP_NOZORDER OR %SWP_FRAMECHANGED
RedrawWindow CB.HNDL, BYVAL %NULL, BYVAL %NULL, %RDW_INVALIDATE OR %RDW_UPDATENOW OR %RDW_ALLCHILDREN OR %RDW_FRAME OR %RDW_ERASE
InvalidateRect CB.HNDL, BYVAL %NULL, %TRUE
END IF
EXIT FUNCTION
Seems your Thor hammer approach would be the fix.