Window is not repainted.

Windows specific forum
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

LOL. :lol:

Must have been very hard to write. :D
@}--`--,-- A rose by any other name ..
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

:oops: :lol:
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8452
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Robbing from my code from last year, the Image.pb code can be perfected in the main loop thus:

Code: Select all

If EventID 
  If GetActiveWindow()<>WindowID(0)
     ;redraw
  EndIf  
EndIf
That covers the eventuality that the window gets covered up and a repaint is not triggered. Only 1 or 2 events get fired after it goes inactive, so it isn't sitting back there redrawing endlessly.

BTW, if a callback is not getting the #WM_REPAINT message, that is no fault of PB's, so a bug report wouldn't likely produce any fix. imho anyway. [edit] - too late.
BERESHEIT
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Okay, it makes sense to idle down the window if it thinks it is totally covered.

netmaestro wrote:BTW, if a callback is not getting the #WM_REPAINT message, that is no fault of PB's, so a bug report wouldn't likely produce any fix. imho anyway. [edit] - too late.
Depends - does PureBasic core get the info first and then call the callback? Or does windows call the callback and then pass the messages on to Pure? Either way, a message goes awol. The fact that it turns up in the main event loop is interesting. I am sure it means something deeply significant to someone but it just gives me a headache as I try to follow it through. :)
@}--`--,-- A rose by any other name ..
Post Reply