Strange black bar when using SetWindowColor()

Post bugreports for the Windows version here
mag
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Mar 29, 2004 1:46 pm

Strange black bar when using SetWindowColor()

Post by mag »

PB 4.61 test on win 7 vista and winxp
The problem happen after
-run the code
-Open Taskmanager ontop Movie
-move Taskmanager window around on movie
-minimize Taskmanager
it leaves Movie with blank black screen (no movie showing )

You can go to this link for more info:
http://www.purebasic.fr/english/viewtop ... 13&t=52129

Use this sample code to test

Code: Select all

Filename$ = OpenFileRequester("select your mpg file","","Mpg (*.mpg)|*.mpg|All files (*.*)|*.*",0)
InitMovie()
Global can
Procedure drawControl(width,height)
   If StartDrawing(CanvasOutput(can))
      DrawingMode(#PB_2DDrawing_Default)
      Box(0, 0,width,height,RGB(0,0,0))
      DrawingMode(#PB_2DDrawing_Outlined)
      Box(10,10,30,10,RGB(255,0,0))
      StopDrawing()
   EndIf
EndProcedure
If LoadMovie(0,Filename$)
    WIN=OpenWindow(#PB_Any, 0, 0, MovieWidth(0)+50, MovieHeight(0)+50, "",#PB_Window_SystemMenu|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget|#PB_Window_TitleBar|#PB_Window_ScreenCentered)
    SmartWindowRefresh(WIN,1)
   SetWindowColor(WIN, RGB(0,0,0))
    ResizeMovie(0,25,25,MovieWidth(0),MovieHeight(0))
    PlayMovie(0, WindowID(WIN))
   can=CanvasGadget(#PB_Any,0,MovieHeight(0)+25,MovieWidth(0)+50,25)
   ExamineDesktops()
    ResizeWindow(WIN,0,200,DesktopWidth(0),200)
    Repeat
      event= WaitWindowEvent(10)
       Select event
      Case #PB_Event_SizeWindow
         Height.f = WindowHeight(WIN)
         Width.f = WindowWidth(WIN)
         ResizeMovie(0,25,25,width-50,height-50)
         ResizeGadget(can,0,height-25,width,25)
         drawControl(width,25)
       Case #PB_Event_CloseWindow
         Break
      EndSelect
   ForEver
EndIf