Tue, 07 Sep 2004
Direct video memory access
UInt32       *ptrScreen = BmpGetBits(WinGetBitmap(WinGetDisplayWindow()));
// 8bits/color, 320x320 display.. fill entire display with black
UInt32       count = 320*320

while(count--) { ptrScreen[count] = 0; }

* since OS3.5

is neccessary to evalute number of colors used and desired resolution. Buffer is by rows from upper. 16bit (65535) means 2bytes per pixel, 256 means 1byte etc...

for PalmOS<3.5 use the following:

WindowType  *winP;
winP = WinGetWindowHandle( win );
ptr = winP->displayAddrV20;

(posted at 09:21 | filed under programming/palmbits | link)    (comments | add new)