Hi,
I am trying to emulate WinScreenLock on pre-3.5
devices. I am wanting my custom list draw routine to
appear to be faster. I can do this just fine using the
WinScreenLock but I want the functionality in the
older OSs. However, it appears that when I use
WinSetDrawWindow and when LstPopList is called that it
draws to the screen and not the offscreen window.
Here is a code segment:
-- begin code --
drawListData.indexStop = list.numItems - 1;
drawListData.hOffscreen =
WinCreateOffscreenWindow(160, 160,
screenFormat, &error);
if(error)
SysFatalAlert("error #1");
if(drawListData.hOffscreen == NULL)
SysFatalAlert("error #2");
drawListData.hScreen = NULL;
if(drawListData.hOffscreen && error == 0) {
RectangleType rect = {{0, 0}, {160, 160}};
//SysFatalAlert("good");
drawListData.hScreen =
WinSetDrawWindow(drawListData.hOffscreen);
WinCopyRectangle(drawListData.hScreen,
drawListData.hOffscreen,
&rect, 0, 0, winPaint);
}
sel = LstPopupList(&list);
if(drawListData.hOffscreen != NULL)
WinDeleteWindow(drawListData.hOffscreen,
false);
-- end code --
Note that the WinCopyRectangle to copy the hOffscreen
window is inside the custom draw routine.
Any ideas on why this does not work?
Thanks,
Mike McCollister
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/