Evening Ralf,

> Of course, that way would be very slow. Hmm, does anyone know, how this
> works in Windows? No flicker or anything else. How do they do it?

Charles Petzold (Petzhold?) is your friend!

In Windows, when the window is being dragged around, a message is sent
to the application. The messages is (or used to be) WM_SIZE. The
application responded by redrawing the parts of the display that had
changed (or, if badly written, the entire display!) This WM_SIZE message
is sent for every single pixel that the window is moved/sized by.

There was a way to improve things, when you got lots and lots of
WM_SIZE, you responded and the return value told the system not to
process all the previous ones in the message queue. So, if you managed
to move the window (or size it) by 50 pixels, you should have 50 WM_SIZE
messages to react to and redraw the contents 50 times.

However, because it takes time (Windows was a non-pre-emptive multi
tasking system) you may have had a delay in getting around to processing
the messages, so you only had to process the final one and Windows would
clear out your queue.

Your program usually didn't know how many duplicate messages were in the
queue though.

Now, I think the above is correct or almost correct. I haven't done any
raw Windows programming since way back before Delphi 1 and C++ Builder 1
from Borland.

Now, can someone tell me if the IOP_OUTLN call can be used to
move/resize a window. It has a parameter - the (new) OUTLN dimensions
AND a flag that says to clear (or not) the window contents.

I assume (through complete ignorance!) that the 'clear window flag' is
used when the Window is being re-outlined but we need/want to keep
whatever is displayed within the window itself?

Alternatively, if OUTLN is only ever used to outline my primary window
then who on Earth would I need to preserve the contents?

I'm thinking along the lines of having the pointer return when the mouse
moves (somehow) and then re-OUTLN the window while preserving the
contents and something along those lines could be used todrag the border
to a new position and/or size without using the official resize/move
routines.

Or, I may just be babbling!


Cheers,
Norman.
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to