Zedna Posted August 2, 2005 Posted August 2, 2005 I need to have picture and on top of it draw by GuiCtrlCreateGraphic But it seems Graphics is always at bottom (under) of picture. I searched forum, tried various styles but no luck So can somebody help me with this? Thanks Here is my simple example (only change name of image to something you have on HDD): #include <GuiConstants.au3> $GOOYE = GuiCreate("MyGUI", 800, 600) GUICtrlCreatePic("background.jpg",0,0,500, 500) GUICtrlSetState(-1, $GUI_DISABLE) ; buttons are OK (over image) $Button_1 = GuiCtrlCreateButton("Button 1", 10, 10, 50, 20) $Button_2 = GuiCtrlCreateButton("Button 2", 10, 40, 50, 20) ; but graphics isn't visible, why? ; red cros $a=GuiCtrlCreateGraphic(50, 50, 100, 100) GUICtrlSetGraphic(-1,$GUI_GR_COLOR, 0xff0000) GUICtrlSetGraphic(-1,$GUI_GR_MOVE, 50,0) GUICtrlSetGraphic(-1,$GUI_GR_LINE, 50,100) GUICtrlSetGraphic(-1,$GUI_GR_MOVE, 0,50) GUICtrlSetGraphic(-1,$GUI_GR_LINE, 100,50) GuiCtrlSetGraphic ($a, $GUI_GR_REFRESH); attempt to help redraw GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Resources UDF ResourcesEx UDF AutoIt Forum Search
jpm Posted August 2, 2005 Posted August 2, 2005 Graphics is always a background painting. no possibility to put them on top. That's the limit of not redesining a specific control. Usualy other control badly work when overlapped.
Zedna Posted August 2, 2005 Author Posted August 2, 2005 Graphics is always a background painting.no possibility to put them on top.That's the limit of not redesining a specific control. Usualy other control badly work when overlapped.<{POST_SNAPBACK}>And what about some trick with DllCall, is it possible?Thanks anyway. Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted August 2, 2005 Author Posted August 2, 2005 I meant this: - get handle of background image - ?getd DC of this? - call API MoveTo, LineTo with this device context thanks for some sample scripts/ideas... Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted August 2, 2005 Author Posted August 2, 2005 I found some useful scripts on forum (search for text: LineTo)One of these:Writing over the screen Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted August 8, 2005 Author Posted August 8, 2005 Writing over the screenAnd when there will be posibility of handling windows messages in AutoItthen I can do that Moveto,Lineto stuff in WM_PAINT Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now