Hi guys, I've a problem and maybe some one that know more than me can help me to solve it.
I've 1 gui made in autoit, It simply act in background in a game window. Cause it is fully in background I want to add preview of the window where I do actions. So I decided to make 2 autoit scripts.
The script A perform actions in the game.
The script B should get the preview of the game and edit the Pic control image (GuiCtrlCreatePic) in the script A GUI.
In the script B i've this code:
But it simply don't work. At the start the pic control has a black image. After the execution of script B the control Pic seems to be empty, so I'm sure that something happened but I can't figure out to make it working :(
Thanks in advance
I've 1 gui made in autoit, It simply act in background in a game window. Cause it is fully in background I want to add preview of the window where I do actions. So I decided to make 2 autoit scripts.
The script A perform actions in the game.
The script B should get the preview of the game and edit the Pic control image (GuiCtrlCreatePic) in the script A GUI.
In the script B i've this code:
Code:
Local $hWnd = ControlGetHandle("Script A GUI","","[CLASS:Static; INSTANCE:10]")
_GDIPlus_Startup()
$himage = _GDIPlus_ImageLoadFromFile("test.bmp")
$HBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($himage)
_SendMessage($hWnd,$STM_SETIMAGE,$IMAGE_BITMAP,$HBITMAP)
Exit
Thanks in advance