Jump to content

Controls are not going to the right windows


Recommended Posts

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

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

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...