Hi, I try draw diferents buffers in the same Gui, without manipulate it like one big handler (or unique), but, divide it in little handlers and control each one in diferent way.
The idea is a window with normal controls (GUICtrlCrateButton and similars) and with two or more _GDIPlus_ImageGetGraphicsContext...
I search in the forum and found wonderful exemples (but very complex to me at this moment), I cant see 'where' are correct form to write this two controls/handlers.
I will try many times, but does not work... I need help to draw pics/handlers.
Thanks.
The idea is a window with normal controls (GUICtrlCrateButton and similars) and with two or more _GDIPlus_ImageGetGraphicsContext...
I search in the forum and found wonderful exemples (but very complex to me at this moment), I cant see 'where' are correct form to write this two controls/handlers.
I will try many times, but does not work... I need help to draw pics/handlers.
Thanks.
[ autoit ]
#include <Misc.au3> #include <GDIPlus.au3> Opt("GUIOnEventMode", 1) $hGui = GUICreate("GDI+ Two buffers", 1200, 600, -1, -1) GUISetBkColor(0xAABBCC, $hGui) GUISetOnEvent(-3, "close") GUISetState() _GDIPlus_Startup() $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui) $hBitmat00 = _GDIPlus_BitmapCreateFromGraphics(80, 440, $hGraphics) $hBitmat01 = _GDIPlus_BitmapCreateFromGraphics(880, 560, $hGraphics) $hBuffer00 = _GDIPlus_ImageGetGraphicsContext($hBitmat00) $hBuffer01 = _GDIPlus_ImageGetGraphicsContext($hBitmat01) $hFile0 = _GDIPlus_ImageLoadFromFile("bar.png") $pic0 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hFile0) _GDIPlus_BitmapDispose($hFile0) $hFile1 = _GDIPlus_ImageLoadFromFile("04.png") $pic1 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hFile1) _GDIPlus_BitmapDispose($hFile1) Do _GDIPlus_GraphicsClear($hBuffer00) _GDIPlus_GraphicsClear($hBuffer01) _GDIPlus_GraphicsDrawImage($hBitmat00, $pic0, 0, 0) _GDIPlus_GraphicsDrawImage($hBitmat01, $pic1, 0, 0) _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmat00, 5, 45, 80, 440) _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmat01, 90, 5, 880, 560) Sleep(15) Until False Func close() _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_GraphicsDispose($hBuffer00) _GDIPlus_BitmapDispose($hBitmat00) _GDIPlus_GraphicsDispose($hBuffer01) _GDIPlus_BitmapDispose($hBitmat01) _GDIPlus_Shutdown() Exit EndFunc ;==>close