> When I create an offscreen window using WinCreateOffscreenWindow, is the
> handle created locked? I am assuming that it is since I get a bus error when
> I try to lock the handle.
>
> Now the real question is how do I get the pointer for the offscreen data?
> For example, the call below I get a handle called hOffscreen.
>
> hOffscreen = WinCreateOffscreenWindow(COLORS_WIDTH, COLORS_HEIGHT,
> screenFormat, &error);
hOffscreen is a handle to the WindowType structure :))
> I want to do something like
>
> UInt8 *pScreen = (UInt8 *)(*hOffscreen);
---
/**
* Determine the pointer to the bitmap data chunk for a specific window.
*
* @param win the window.
* @return a pointer to the bitmap data chunk.
*/
void *
DeviceWindowGetPointer(WinHandle win)
{
void *result = NULL;
// palmos 3.5 - use BmpGetBits()
if (DeviceSupportsVersion(romVersion3_5)) {
result = BmpGetBits(WinGetBitmap(win));
}
// palmos pre 3.5 - use standard technique
else
result = (void *)win->displayAddrV20;
return result;
}
---
straight from the Cube3D sources :)
// az
[EMAIL PROTECTED]
http://www.ardiri.com/ <--- free games!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/