Page 1 of 1

Posted: Sun Mar 23, 2003 11:56 am
by BackupUser
Restored from previous forum. Originally posted by momo.

If i want to draw on a window, the ext comes on every window wich is opened. how could i do this to draw only on one window???
maybe someone has got a code for me.

Thank You!!

Don't Look so stupid
I've got no Signature!!

Posted: Sun Mar 23, 2003 12:22 pm
by BackupUser
Restored from previous forum. Originally posted by plouf.

when you use StartDrawing(WindowOutput()) it only draws in currently used window
if you wand to change used window use UseWindow(#Windowtouse)

Christos

Posted: Sun Mar 23, 2003 12:28 pm
by BackupUser
Restored from previous forum. Originally posted by momo.

That's what i made!
But the text of the firs window was displayed at the secons window, too!????

Don't Look so stupid
I've got no Signature!!

Posted: Sun Mar 23, 2003 12:50 pm
by BackupUser
Restored from previous forum. Originally posted by freak.

Works fine here.

Maybe you can show some code that causes the effect, so we can
try to find out why it doesn't work for you?

Timo

Posted: Sun Mar 23, 2003 1:13 pm
by BackupUser
Restored from previous forum. Originally posted by plouf.

this one works here

Code: Select all

OpenWindow(0,100,100,100,100,#PB_Window_SystemMenu,"Window1")

StartDrawing(WindowOutput())
  Box(10,10,80,80,RGB(00,00,255))
  DrawText("Hello")
StopDrawing()

OpenWindow(1,200,100,100,100,#PB_Window_SystemMenu,"Window2")

StartDrawing(WindowOutput())
  Box(10,10,80,80,RGB(00,255,00))
  DrawText("Hello2")
StopDrawing()

Repeat

Until WaitWindowEvent() = #PB_Event_CloseWindow
End 
Christos