You mean something like this?:
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#Include <Misc.au3>
Opt("GUIOnEventMode", 1)
Opt("MouseCoordMode",2)
Global $dll = DllOpen("user32.dll")
_GDIPlus_Startup()
Global $bitmap_from_file = _GDIPlus_BitmapCreateFromFile(@ScriptDir & '\Europe.bmp')
Global $width = _GDIPlus_ImageGetWidth ($bitmap_from_file)
Global $height = _GDIPlus_ImageGetHeight ($bitmap_from_file)
Global $hwnd = GUICreate("GDI32: Flood Fill Example", $width, $height)
GUISetOnEvent(-3, "Close")
GUISetState()
Global $hDC = _WinAPI_GetDC($hWnd)
Global $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC)
_GDIPlus_GraphicsDrawImageRect($hGraphics, $bitmap_from_file, 0, 0, $width, $height)
Global $hBrush = DllCall("gdi32.dll", "long", "CreateSolidBrush", "int", 0xFF5050) ; fill color BGR
Global $obj_orig = DLLCall("gdi32.dll", "int", "SelectObject", "int", $hDC, "int", $hBrush[0])
While Sleep(50)
If _IsPressed("01") And WinActive($hWnd) Then
$mp = MouseGetPos()
DllCall("gdi32.dll", "int", "FloodFill", "int", $hDC, "int", $mp[0], "int", $mp[1], "int", 0x000000)
EndIf
WEnd
Func Close()
DllClose($dll)
DLLCall("gdi32.dll", "int", "SelectObject", "hwnd", $hwnd, "int", $obj_orig[0])
DLLCall("gdi32.dll", "int", "DeleteObject", "int",$hBrush[0])
_WinAPI_ReleaseDC($hWnd, $hDC)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
Exit
EndFunc
Br,
UEZ