Forms & Buffers

A PocketC native palm library offering native forms and assorted utilities

Postby Robin Hamilton-Pennell on Fri Apr 12, 2002 12:17 am

I have been having trouble with this for some time and am wondering what stupid mistake I am making, so any help would be appreciated.

Basically, I load a resource form that is used a a "browser" for images. I have it go through a list of different images just fine and load the image into a custom buffer:

Fctl(LOAD,3000); //Editor
Fctl(LOAD,3100); //Small dialog
Fctl(LOAD,3200); //"Browser"

// event loop here eventually calls the following buffer functions:

Now, here is where my problem is. I try to switch from a smaller form to a larger one (3100 to 3000) using Fctl(DRAW,3000); and then copy the bitmap to the screen. This works great, but then, after trapping the pen x and y coordinates with Fevent and redrawing the bitmap to the screen from the buffer, the bitmap copies to the screen using the coordinate system from the smaller window! To make a (very) long story short, after the user taps the pen down, the entire bitmap and coordinate system shifts down to the bottom of the screen.

If anyone understood this, and has any ideas, please share them... I really would appreciate the help!!

Robin Hamilton-Pennell
Posts: 1
Joined: Thu Apr 11, 2002 11:59 pm
Location: USA

Postby jstadolnik on Fri Apr 12, 2002 12:58 am

The current coordinate scheme is always anchored to the upper-left hand corner of the current active form/dialog. This is just the way the palmOS works. It's not a bug. See the second sentence of the Dialog() function documentation... this will give you an idea to why it works this way.


The PToolboxLib guy.

Edited by - jstadolnik on 04/11/2002 20:02:11
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 2 guests