eynstyne Posted January 5, 2007 Share Posted January 5, 2007 I have a program with lots of child windows and one window with a graphic control. As I play something on the piano window, the graphic control is supposed to wave graph it. But when I use a GuiCtrlDelete() and try to recreate the graphic, it will take any window that is activated and create the control in that window! How would I get a control to always be created in one window only no matter what window I select? Some code to demonstrate... $form = Guicreate("Graphic window thing",200,200,-1,-1) ;;Bunch of menus and stuff goes here guisetstate() GuiCreate("Another Window",200,200,-1,$WS_EX_MDICHILD,$form) $g1 = GuictrlcreateGraphic(0,0,200,200) ; Background $g2 = GuictrlcreateGraphic(0,3,500,500) ; The graph for the wave thing guisetstate() while 1 StartGraphing() wend Func StartGraphing() $i = $i + 1 if $i >= 200 then $i = 0 Guictrldelete($g2) $g2 = GuictrlcreateGraphic(0,3,500,500) endif ;;The rest will graph things endfunc F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
jpm Posted January 5, 2007 Share Posted January 5, 2007 (edited) to create on a specific windows you need to use GUISwitch to that window before GUICtrlCreate... Edited January 5, 2007 by jpm Link to comment Share on other sites More sharing options...
eynstyne Posted January 5, 2007 Author Share Posted January 5, 2007 TYVM, I'll try that F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
eynstyne Posted January 5, 2007 Author Share Posted January 5, 2007 Did the trick. Thanks jpm F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
Recommended Posts