Markus Posted March 29, 2007 Share Posted March 29, 2007 Why doesn't it work to set a graphic after GUISetState(@SW_SHOW) #include <GUIConstants.au3> Opt("MouseCoordMode", 0) $child=GUICreate("My Draw") GUISetState() $x_pos=20 $y_pos=20 $a=GuiCtrlCreateGraphic(20, 20, 100,100) GUICtrlSetBkColor(-1,0xffffff) GUICtrlSetColor(-1,0) GUICtrlSetGraphic($a,$GUI_GR_COLOR, 0xff0000,0xff0000) GUICtrlSetGraphic ( $a, $GUI_GR_PIXEL , $x_pos,$y_pos ) GUICtrlSetGraphic($a,$GUI_GR_COLOR, 0xff0000,0xff0000) GUICtrlSetGraphic ( $a, $GUI_GR_PIXEL , $x_pos,$y_pos+1 ) GUICtrlSetGraphic($a,$GUI_GR_COLOR, 0xff0000,0xff0000) GUICtrlSetGraphic ( $a, $GUI_GR_PIXEL , $x_pos,$y_pos+2 ) Do $msg=GUIGetMsg() Until $msg=$GUI_EVENT_CLOSE "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
_Kurt Posted March 29, 2007 Share Posted March 29, 2007 I had that problem before, I find it always shows if you add a GUICtrlSetState($graphic, $GUI_SHOW) after the Graphic if created & set. #include <GUIConstants.au3> Opt("MouseCoordMode", 0) $child=GUICreate("My Draw") GUISetState() $x_pos=20 $y_pos=20 $a=GuiCtrlCreateGraphic(20, 20, 100,100) GUICtrlSetBkColor(-1,0xffffff) GUICtrlSetColor(-1,0) GUICtrlSetGraphic($a,$GUI_GR_COLOR, 0xff0000,0xff0000) GUICtrlSetGraphic ( $a, $GUI_GR_PIXEL , $x_pos,$y_pos ) GUICtrlSetGraphic($a,$GUI_GR_COLOR, 0xff0000,0xff0000) GUICtrlSetGraphic ( $a, $GUI_GR_PIXEL , $x_pos,$y_pos+1 ) GUICtrlSetGraphic($a,$GUI_GR_COLOR, 0xff0000,0xff0000) GUICtrlSetGraphic ( $a, $GUI_GR_PIXEL , $x_pos,$y_pos+2 ) GUICtrlSetState($a, $GUI_SHOW) Do $msg=GUIGetMsg() Until $msg=$GUI_EVENT_CLOSE Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
jvanegmond Posted March 29, 2007 Share Posted March 29, 2007 (edited) ;draw sequence GUICtrlSetGraphic($var,$GUI_GR_REFRESH) Edited March 29, 2007 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
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