| 3 | 3 | To resolve this without the need for a complex $WM_PAINT message handler, the updated example separates the source and target canvas by creating a new blank bitmap via _GDIPlus_BitmapCreateFromScan0. The original capture is drawn onto this new bitmap while applying the ColorMatrix attributes, preventing any GDI+ source-target conflicts. Finally, the processed image is converted to a GDI handle and assigned to a native AutoIt Picture control (GUICtrlCreatePic) via $STM_SETIMAGE. This solves both issues at once: it ensures clean GDI+ rendering and relies entirely on native Windows OS routines to keep the image persistent during minimization or restoration. |