Page 1 of 1

PostPosted: Mon Sep 30, 2002 11:02 am
by chrisleeuk
Here are a few questions. (they are kind of related to each other)

What are the main issues involved in programming Pocket C
applications for different Windows CE devices?

I have seen on the forum posts about different screen co-ordinates, is this true?

How do I overcome such issues?

The reason I ask is that I have written a small routine to display a menu at the bottom of the screen.

This is to replace the single 'File' menu that appears on my Ipaq with Pocket C. So now I can have 'File' 'Edit' 'Options' etc
running along the bottom.

Do I need to adjust my calculations for different displays?

Also do all devices supported by Pocket C use the same kind of menu?

PostPosted: Mon Sep 30, 2002 11:23 am
by guy
You need to make substantial changes to make menus work on the non-pocketpc format ce platforms.

You can lift all of the calculations from my menu bar library (cmdbar) that produces menus in the right place on all CE platforms. Download it from the library link in my sig below.

My library makes use of a standard V3 compiler macro (<b>__PKTC__</b>) to conditionally compile code for old PocketC V2 and for V3 (V3 supports the deviceplatform() function that tells you the device type). Unfortunately a bug introduced in the latest PocketC compiler means that the compiler macro is no longer automatically defined by the compiler. This is in the cmdbar_init() function at the top of the code. Just always include the __PKTC__ bit.

The windefs.h included in the ZIP file is possibly a bit out of date. There's an updated one in the CEAPI download.

The menu library doesn't use CEAPI, it just shares the download page.

PocketC CE API interface:
PCForm and CE API forum:

PostPosted: Tue Oct 01, 2002 8:16 pm
by KOU
I have a problem with your PocketC Menu library.
I am using PocketPC (E700, Japanese ver of EM500 with added memory), but the menu don't display at the bottom.

deviceplatform() returns 4 (PocketPC).


P.S. Listview in CEAPI still does not work in PocketPC.
-----I tried the sample Mickle provided in your knowledge base.
-----It seems that it work in other platforms. (ex. HPC)

PostPosted: Wed Oct 02, 2002 7:54 am
by guy
The latest version of pceditor has a bug where it doesn't define the __PKTC__ macro.

The menu library has a #ifdef __PKTC__ around the call to deviceplatform() so that it still works in PocketC V2 (which didn't have the deviceplatform() function).

Edit cmdbar.pc and remove the #ifdef block around the call to deviceplatform(), or edit your source file and add a #define __PKTC__ before the includes for cmdbar.h and cmdbar.pc

Or, edit default.dat and put in all of the static defines that the compiler used to provide. Obviously the line and date ones can't be done this way.

I'm gearing up for another release of CEAPI (even though I said I wouldn't). I'll have another look at listview before I build everything.

PocketC CE API interface:
PCForm and CE API forum:

PostPosted: Wed Oct 02, 2002 6:33 pm
by KOU
Thank you very much guy!