Re: How to draw low density bmp on high density display?

2004-08-24 Thread George VS
Hi,

The problem is I dont want to ship databases with bitmap families,
but rather display bitmap as is so that 1pix in bitmap is rendered to
exactly 1phisical devise pixel.

What I experience and try to avoid is scaling the bitmap on high-density
displays!
I tried WinSetScalingMode(kBitmapScalingOff);
I tried WinSetCoordinateSystem(kDensityDouble/ kDensityLow);
I tried BmpCreateBitmapV3(pBmpV1, kDensityDouble/ kDensityLow,
BmpGetBits(pBmpV1)...);
I tried WinCreateOffscreenWindow(...nativeFormat/ screenFormat);
Nothing worked as targetted.

What I need is effect of drawing bitmap (BitmapTypeV3) with kDensityDouble.

Thanks!
George VS ([EMAIL PROTECTED])

"Matt Graham" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> George VS wrote:
> > I have a low density bitmap I wish to draw on high density display
without
> > being scaled.
> > Can anyone tell me how is this done?
> >
> > I tried:
> >
> > WinSetScalingMode (kBitmapScalingOff);
> > WinDrawBitmap(bmpP, x, y);
> >
> > but this has none effect ?!
> >
> > When the bitmap uses version3 bmp format, the blitter properly selects
> > high-density bitmap and renders it as I wish.
> >
> > So, how can a 160x160 pix bitmap be rendered on left top portion of the
> > screen on high density display devices?
>
> What if you store it as 2 separate bitmap families?  One with the bitmap
> in single density, the other in double density.  Then pick the bitmap
> based on WinGetCoordinateSystem()?
>
> /*
>   * Matt Graham
>   * Palm OS Developer
>   * www.healthramp.com
>   */
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


RE: FrmGetObjectIndex problem

2004-08-24 Thread Jeffry Loucks
Older OS (pre 3.something) FrmGetObjectIndex() would fatal if the object was
not found!

Check the OS version and if it's an early one that crashes instead of
returning an error, patch the FrmGetObjectIndex() trap a local function.

Example:


// generalized structure that matches the pre OS4 structures
typedef struct
{
//WindowTypewindow; // the old
WindowType struct was 40 bytes long
UInt8   window[40];
UInt16  formId;
//FormAttrType  attr;   // the old
FormAttrType struct was a UInt32
UInt32  attr;
//WinHandle bitsBehindForm;
void *  bitsBehindForm;
//FormEventHandlerType *handler;
void *  handler;
UInt16  focus;
UInt16  defaultButton;
UInt16  helpRscId;
UInt16  menuRscId;
UInt16  numObjects;
//FormObjListType * objects;
struct PrvFormObjList
{
//FormObjectKindobjectType;
UInt8   objectType;
UInt8   reserved;
//FormObjectTypeobject;
union
{
void*ptr;
} object;
} *objects;
} PrvFormType;

/**
 * Get the object index for the current alert.
 *
 * PalmOS prior to v4.0 crashed if object not found in form.
 * Use form structure internals to find object non-fatally.
 *
 * This stuff is here for backward compatibility. It allows compiling on
 * future SDKs, and then deciding to use the stuff at runtime. Otherwise,
 * you have to do different builds, and that's a pain.
 */
static UInt16 PrvFrmGetObjectIndex(const PrvFormType *formP, UInt16 objID)
{
struct PrvFormObjList *pObj = formP->objects;
UInt16 itemIndex = formP->numObjects;

while (itemIndex--)
{
if (*(UInt16*)pObj[itemIndex].object.ptr == objID)
return itemIndex;
}
return frmInvalidObjectId;
}

/**
 * Install system hacks/patches.
 *
 */
static void PrvInstallPatches(void)
{
UInt32 romVersion;

FtrGet(sysFtrCreator,sysFtrNumROMVersion,&romVersion);
if (romVersion < sysMakeROMVersion(4,0,0,sysROMStageDevelopment,0))
{

SysSetTrapAddress(sysTrapFrmGetObjectIndex,(void*)PrvFrmGetObjectIndex);
}
}

 


Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Mobile 253-691-8812 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
 

-Original Message-
From: Geoffrey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 24, 2004 10:34 PM
To: Palm Developer Forum
Subject: FrmGetObjectIndex problem

Hi all,

I got a form with some dynamically created objects.
When I use FrmGetObjectIndex in TT (and os5 simurator), when there are no
such object ID (the object doesn't exist), it will return frmInvalidObjectId
(equal = -1).

But when I do the same things in Clie N610 (which is os4), it will return
65535.

Finally, if I ran the program in Palm V (os3.2), it will return an fatal
error said the object doesn't exist.


I want to use FrmGetObjectIndex to see if the object exist, is there any way
to do it in all different version of palmos?

Thank's for your advice.

Geoffrey



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: FrmGetObjectIndex problem

2004-08-24 Thread Ben Combee
At 12:34 AM 8/25/2004, you wrote:
Hi all,
I got a form with some dynamically created objects.
When I use FrmGetObjectIndex in TT (and os5 simurator), when there are no
such object ID (the object doesn't exist), it will return frmInvalidObjectId
(equal = -1).
But when I do the same things in Clie N610 (which is os4), it will return
65535.
Finally, if I ran the program in Palm V (os3.2), it will return an fatal
error said the object doesn't exist.
I want to use FrmGetObjectIndex to see if the object exist, is there any way
to do it in all different version of palmos?
You can use the APIs to:
1) Find out how many objects are on the form
2) Iterate through all objects by index
3) Check to see if the object is of a type that would have an ID
4) Convert an index to an ID for appropriate types
Put this all together into a useful utility function.
-- Ben Combee, DTS technical lead, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


FrmGetObjectIndex problem

2004-08-24 Thread Geoffrey
Hi all,

I got a form with some dynamically created objects.
When I use FrmGetObjectIndex in TT (and os5 simurator), when there are no
such object ID (the object doesn't exist), it will return frmInvalidObjectId
(equal = -1).

But when I do the same things in Clie N610 (which is os4), it will return
65535.

Finally, if I ran the program in Palm V (os3.2), it will return an fatal
error said the object doesn't exist.


I want to use FrmGetObjectIndex to see if the object exist, is there any way
to do it in all different version of palmos?

Thank's for your advice.

Geoffrey



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: CW error reading memory on device

2004-08-24 Thread Shree S


 Probably this is a improper memory allocation problem. This problem occurs  when more 
no. of bytes are written in the buffer of small size (not sufficient to hold the 
complete data - a MEMORY OVERFLOW).

Check size of all the memory allocations you are doing, whether its large enough to 
hold the data.

Thanks
bye

- Original Message -
From: Lorraine Chin <[EMAIL PROTECTED]>
Date: Tue, 24 Aug 2004 10:41:51 -0400
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Subject: CW error reading memory on device

> 
> Does anyone know why I'm getting "error reading memory on device" whenever 
> I try to set a breakpoint using the CodeWarrior debugger?  I'm debugging 
> over the USB port to a Tungsten T3.  I had been working with a T2 that ran 
> the same application and same CodeWarrior without any problems.  I'm using 
> CW 9.3 on Windows 2000 and the T3 is running an application built on Palm 
> OS 5.3
> 
> Thanks in advance,
> Lorraine
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
> http://www.palmos.com/dev/support/forums/

-- 
__
IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com 
Check out our value-added Premium features, such as an extra 20MB for mail storage, 
POP3, e-mail forwarding, and ads-free mailboxes!

Powered by Outblaze

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


String Tokenizer

2004-08-24 Thread Jarrod Plant
Hi, does anyone know of a way to tokenize a string?  I have tried using the 
standard C function (strtok) and I had a bundle of memory issues.  I have 
also tried implementing my own by copying the source of the standard C strtok 
and modifying the datatypes.  Still I always get memory issues.  I'm very new 
to C and palm programming, so I'm having a lot of trouble with memory 
handling.  I'd appreciate any help that I can get.  (code samples would be 
greatly appreciated :) )

Thanks
Jarrod

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


How to detect when status bar is tapped on T3

2004-08-24 Thread Mike McCollister
I am trying to detect when the status bar is tapped on the T3.  When it is
taped, I want to do something before say the bluetooth form comes up. However,
I don't know what event to search for.  I'm looking at events before
SysHandleEvent so this should work but I can't figure it out.

Thanks,

Mike



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Changing pages using Tungsten T3 soft buttons

2004-08-24 Thread Mike McCollister
I have an application that has muliptle pages.  When I have my application
assigned to a hard button and it is pressed multiple time, it will go to the
next page.  However, I have found that when I assign my application to one of
the T3 soft buttons that pressing it multiple times does not make it change. 
Here is a portion of code that I am using.  Right now I am check if the char is
a hard key but I'm sure that I have to check for something else here.  What is
the right thing to do?

// handle pressing of application button multiple times
if(event.eType == keyDownEvent)
   if(TxtCharIsHardKey(event.data.keyDown.modifiers,
   event.data.keyDown.chr))
  if(!(event.data.keyDown.modifiers & poweredOnKeyMask))
 GotoNextPage();

Note that the built-in applications do no respond to this.

Thanks,

Mike



__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Treo 600 Simulator "Missing PhoneLib" errors

2004-08-24 Thread Ben Combee
At 03:59 PM 8/24/2004, you wrote:

My apologies if this is obvious or has been answered before.
When starting up a Treo 600 emulator (Verizon CDMA Debug), a series of 
error messages about the missing phone library are output by the Simulator:
   e.g.
"Error getting Phone Library",
"Phone Lib failed to load".

I understand that Treo600s have their own implementation of Phone Library 
(as well as other libraries),  so,
You need to right click on the simulator, change the radio type to CDMA, 
and reboot the sim.

-- Ben Combee, DTS technical lead, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Treo 600 Simulator "Missing PhoneLib" errors

2004-08-24 Thread will rogers

My apologies if this is obvious or has been answered before.
When starting up a Treo 600 emulator (Verizon CDMA Debug), a series 
of error messages about the missing phone library are output by the 
Simulator:
   e.g.
	"Error getting Phone Library",
	"Phone Lib failed to load".

I understand that Treo600s have their own implementation of Phone 
Library (as well as other libraries),  so,

Question 1:
---
Have I miss-configured or miss-installed something?
Question 2:

If no to Q1,  may I do one or both of the following?
a) Just ignore these and assume everything else is OK?
b) Somehow silence these (by providing a dummy DLL or similar trick?
(I have a feeling this is not a good idea ;-)
Question 3:
---
Assuming there is a substitute implementation for the Phone Lib for 
Treo 600, why do I get the same errors when I tap on the "Phone" icon?

Question 4:
---
How would I go about observing the events produced by the Phone 
program processed by the system (simulator using "View->Events")?

Many Thanks
--
==
  Will Rogers[EMAIL PROTECTED]
==
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


VFS Fragmentation?

2004-08-24 Thread Jeff Ishaq
I have a 16MB SD card that I've filled with 3 megs of data, stored in 1082 files.  
Using my cardreader on a Windows box, the card does contain exactly 1082 files, which 
consume around 3 megs of space.  However if I place this exact same card into my Palm 
m515 and do Card Info, it reports 0 free bytes, 14.1 MB used.

Am I hitting fragmentation due to the # of files here?  Is there a defrag algorithm I 
can incorporate?  This is just a VFAT volume, no?

I'm attaching more details below.  Your help is much appreciated!

--- DETIALS ---
I am taking a 3-meg PDB of about 3000 records, and writing it in a proprietary fashion 
to a VFS volume.  Specifically, I create a directory that represents the name of the 
PDB:

/PALM/Programs/MyCompany/MyApp/MyAppData.pdb/

Then, each record of the PDB is stored as an individual file in that directory.  So if 
I want to read record #63(0x3F) out of the PDB 'MyAppData.pdb', I simply read the 
following file:

/PALM/Programs/MyCompany/MyApp/MyAppData.pdb/003F

I have run into some strangeness, and I wonder if it's a VFAT fragmentation issue.  My 
C++ SyngMgr calls to VFSFileWrite() started returning vfsErrVolumeFull unexpectedly.  
I say unexpectedly because there is only about 3 megs of data on this 16-meg card, 
stored in 1082 (veyr small) files.  If I copy the contents to my Windows desktop using 
a cardreader, Windows reports there being only about 3 megs of data.  If I then place 
this same card into my Palm and do Card Info, it reports 14.1 MB used, 0 bytes free.
--- END DETAILS ---

Thanks,
-Jeff Ishaq
Palm OS Certified Developer
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: How to draw low density bmp on high density display?

2004-08-24 Thread Matt Graham
George VS wrote:
I have a low density bitmap I wish to draw on high density display without
being scaled.
Can anyone tell me how is this done?
I tried:
WinSetScalingMode (kBitmapScalingOff);
WinDrawBitmap(bmpP, x, y);
but this has none effect ?!
When the bitmap uses version3 bmp format, the blitter properly selects
high-density bitmap and renders it as I wish.
So, how can a 160x160 pix bitmap be rendered on left top portion of the
screen on high density display devices?
What if you store it as 2 separate bitmap families?  One with the bitmap 
in single density, the other in double density.  Then pick the bitmap 
based on WinGetCoordinateSystem()?

/*
 * Matt Graham
 * Palm OS Developer
 * www.healthramp.com
 */
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


detecting warm reset

2004-08-24 Thread Alexander R. Pruss
I was wondering how I can detect whether a program is being run on a 
warm-reset system.  I am specifically interested in the T3.  (On Clie VG 
units, I can check if the VG library is working.)  This is so that a 
program of mine can do some emergency recovery stuff when the user runs 
it on a unit that has just had a warm-reset.

Thanks!
Alex
--
Dr. Alexander R. Pruss
Department of Philosophy
Georgetown University
Washington, DC 20057-1133  U.S.A.
e-mail: [EMAIL PROTECTED]
online papers and home page: www.georgetown.edu/faculty/ap85
--
"Philosophiam discimus non ut tantum sciamus, sed ut boni efficiamur."
   - Paul of Worczyn (1424)
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: jpeg library

2004-08-24 Thread Konstantin Klyatskin
http://www.absoluteword.com/jpglib/
JPEG/GIF decompression library for Palm OS
  1.. Fast and quality decoding
  2.. Fast JPEG scaling (1:8, 1:4, 1:2, 1:1)
  3.. Optimized palette: 16bpp for 16bpp devices, Web palette for 256 color
device, 4bpp for BW devices.
  4.. GIF animation via one-function call
  5.. Float scaling (bilinear/neighborhood) for bitmaps
-- 

"Palm" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hey everybody
>
> Does anybody know where I can get a free JPG decoder that doesn't require
> the library itself to be loaded into the palm before the application using
> it can function? I've found several free ones, unfortunately they all
> require you to preinstall the library onto the palm. TIA.
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: "Hello world" for Zire 72

2004-08-24 Thread Baxter
I started with PilotMAG - only $25.  It's a front-end for the Open Source
compiler.

-- 
-
Free software  - Baxter Codeworks  www.baxcode.com
-


"Predrag Grkovic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks to everybody.
>
> I've downloaded CodeWarrior for Palm OS 8.0 Demo (they don't have demo for
> 9.0). Last time, I mistakenly downloaded Code Warrior for Windows, somehow
I
> understood it was a version that runs under Windows but produces code for
> PalmOS. But, anyway, $400 for Code Warrior is too much for somebody who's
> just learning and is going to use it only for fun. So, I'll search for
some
> other IDE. Micholi recommended OnboardC at sourceforge.net. I'm gonna take
a
> look at that.
> I also found simulator for Zire 72 and SDK 3.0 from palmOne
> (http://pluggedin.palmone.com thanks to Ben) and am currently reading the
> documentation for SDK. It's specially designed for PalmOne Tungsten and
> PalmOne Zire devices.
>
> Thanks again.
> - Predrag.
>
> "Predrag Grkovic" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello all.
> >
> > I've purchased recently Zire 72 and since I'm a developer by occupation
> > (C++/.NET for Windows platform), I thought I would be able to make
> programs
> > for Zire. But, after spending hours on palmos.com and palmsource.com and
> > downloading and trying dozens of tools, I still don't have a slightest
> idea
> > how to do it. I thought PalmOS developer suite would be enough, but its
> > emulator doesn't support PalmOS5. I've downloaded Code Warrior Trial
> hoping
> > that it was a tool specially designed for PalmOS, but looks like I was
> > wrong. I installed Palm OS SDK 5, tried to find ROM for Zire 72
> > (unsuccessfully) but still I don't seem to be able to write couple of
> words
> > on my Zire's screen.
> >
> > So, does anybody know of any step by step tutorial of how to make
> something
> > like "Hello, world!" for my Zire 72?
> >
> > Thanks a lot, really.
> > - Predrag.
> >
> >
> >
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: "Hello world" for Zire 72

2004-08-24 Thread Predrag Grkovic
Thanks to everybody.

I've downloaded CodeWarrior for Palm OS 8.0 Demo (they don't have demo for
9.0). Last time, I mistakenly downloaded Code Warrior for Windows, somehow I
understood it was a version that runs under Windows but produces code for
PalmOS. But, anyway, $400 for Code Warrior is too much for somebody who's
just learning and is going to use it only for fun. So, I'll search for some
other IDE. Micholi recommended OnboardC at sourceforge.net. I'm gonna take a
look at that.
I also found simulator for Zire 72 and SDK 3.0 from palmOne
(http://pluggedin.palmone.com thanks to Ben) and am currently reading the
documentation for SDK. It's specially designed for PalmOne Tungsten and
PalmOne Zire devices.

Thanks again.
- Predrag.

"Predrag Grkovic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello all.
>
> I've purchased recently Zire 72 and since I'm a developer by occupation
> (C++/.NET for Windows platform), I thought I would be able to make
programs
> for Zire. But, after spending hours on palmos.com and palmsource.com and
> downloading and trying dozens of tools, I still don't have a slightest
idea
> how to do it. I thought PalmOS developer suite would be enough, but its
> emulator doesn't support PalmOS5. I've downloaded Code Warrior Trial
hoping
> that it was a tool specially designed for PalmOS, but looks like I was
> wrong. I installed Palm OS SDK 5, tried to find ROM for Zire 72
> (unsuccessfully) but still I don't seem to be able to write couple of
words
> on my Zire's screen.
>
> So, does anybody know of any step by step tutorial of how to make
something
> like "Hello, world!" for my Zire 72?
>
> Thanks a lot, really.
> - Predrag.
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: nilEvent Timing

2004-08-24 Thread Douglas Handy
Edan,

>I force nil events to happen so I can get accurate timing.

My point is that not every nilEvent will necessarily be because of
EvtSetNullEventTick() or a timeout.  So you may still end up with *extra*
nilEvents, which may or may not impact what you are trying to do.

I don't know all the other conditions which can cause nilEvents, but one example
is having the insertion point enabled in a field object.  The OS causes the
extra nilEvents, and then uses them to show / hide the flashing insertion point.

Doug

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: stack overflow error

2004-08-24 Thread JohnAb24
Thanks Jan, you have been a great help..how do I set the stack pragma to compile these 
critical functions?

...I found a way to somewhat resolve the problem. I have 3 fairly large structs (about 
60 variables). When I try to store all the data in one form, thats when it gives me 
the stack overflow error. So I created another save form and stored data to 2 of the 
large structs there, and it didnt give me the error. However, it's still giving me a 
warning saying that I am 'close' to overflowing the stack, but the program is still 
running fine on the palm deviceI would still like to know how to check for 
functions that are overflowing the stack however for my own knowledge. I've never 
really tried to debug in a low source level.

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: nilEvent Timing

2004-08-24 Thread Greg Lutz
At 10:13 AM 8/24/2004, Edan wrote:
I force nil events to happen so I can get accurate timing.
just use:
EvtSetNullEventTick
I dont know if this is the best way, but it works for my situation.
Thanks!  Look how giving out bad advice ends up teaching you something new :)
Greg Lutz
NearSpace, Inc.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: nilEvent Timing

2004-08-24 Thread Edan
I force nil events to happen so I can get accurate timing.

just use:

EvtSetNullEventTick

I dont know if this is the best way, but it works for my situation.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Listing the applications registered with SysNotifyRegister

2004-08-24 Thread John Smallberries
Hi, does anyone have a method of listing all the applications registered with 
SysNotifyRegister to receive a particular notification?

This information would be handy for debugging.

Thank you.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: CheckBox selected

2004-08-24 Thread Ben Combee
At 10:45 AM 8/24/2004, you wrote:
I use several checkboxes in my program, and I would like that after one of 
them is checked (they have the same group id), and I do my action , the 
"V" is gone (the checkbox will not appear selected).

Does anyone has idea?
You can unselect all of the items by using FrmSetControlValue on each 
checkbox.  There's no API to directly unset a group's selection.

-- Ben Combee, DTS technical lead, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Palm Newbie needs help

2004-08-24 Thread Ben Combee
At 09:56 AM 8/24/2004, you wrote:
>BmpCreate does work. However, on Palm OS 5, you can't directly >access the
>data structures used by the OS. Instead, you should use the SDK and glue
>library calls (BmpGlue.h and Bitmap.h) to handle accessing this >data.
So basically the value returned by OS 5 is a handle, not a pointer? I can 
see that a whole range of data can be retrieved from a bitmap, but how can 
I get direct write access to pixel oriented data. Is there a LockSurface 
type construct (like in MS Direct X)? Even a BmpSetBits from a local 
buffer would do!
If you create an offscreen bitmap, you can directly access its bits after 
calling BmpGetBits.  However, you can't directly access the screen bitmap 
in a portable way -- you need to double buffer, using the offscreen bitmap 
and calling WinCopyRectangle.  You might want to use WinCreateBitmapWindow 
or WinCreateOffscreenB

Of course, you can hack around this if you can verify the action of 
specific hardware.  Some of the game toolkits already contain these hacks, 
but will use safe code paths on unverified devices.

The API reference says that direct access to bitmaps is only disallowed 
for bitmaps created by Palm OS - does this mean there is an alternative 
method of defining a bitmap - e.g. by allocating enough space for the 
header and the data? If so, would that bitmap draw correctly i I call 
WinPaintBitmap?
Sure, you can make your own bitmap structures.  The code in the BmpRsrc 
sample from the PalmSource KB (http://kb.palmsource.com/) illustrates this 
technique.

-- Ben Combee, DTS technical lead, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


CheckBox selected

2004-08-24 Thread Merav Rubinstein
I use several checkboxes in my program, and I would like that after one of them is 
checked (they have the same group id), and I do my action , the "V" is gone (the 
checkbox will not appear selected).

Does anyone has idea?

Thank you for the help.
Merav
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Disable pincode on a Treo 600

2004-08-24 Thread erg
Hello all,

Is it possible, using the Treo 600 API to disable the form asking for the
pincode ?
It would be to avoid having to enter the pincode when powering on the
device.
Regards



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Palm Newbie needs help

2004-08-24 Thread Mark Rabjohn
>BmpCreate does work. However, on Palm OS 5, you can't directly >access the 
>data structures used by the OS. Instead, you should use the SDK and glue 
>library calls (BmpGlue.h and Bitmap.h) to handle accessing this >data.

So basically the value returned by OS 5 is a handle, not a pointer? I can see that a 
whole range of data can be retrieved from a bitmap, but how can I get direct write 
access to pixel oriented data. Is there a LockSurface type construct (like in MS 
Direct X)? Even a BmpSetBits from a local buffer would do!

The API reference says that direct access to bitmaps is only disallowed for bitmaps 
created by Palm OS - does this mean there is an alternative method of defining a 
bitmap - e.g. by allocating enough space for the header and the data? If so, would 
that bitmap draw correctly i I call WinPaintBitmap?

> If you're doing game development, especially for Palm OS 5, you might want 
> to look at using a library like Razor or GapiDraw

I'm used to doing my own low level graphics - I think that using somebody elses would 
lessen the challenge somewhat :)

I just need a little help to get started - a code fragment would be ace :)

Cheers,

Mark
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: stack overflow error

2004-08-24 Thread Jan Slodicka
Those are system functions apparently called in reaction to the redraw
event. They are similar to your functions and share the same stack. Hence
they also take away some space on the stack and you have to program the way
that you allow them to do so.  While it is true that nobody will tell you
how much space these functions take, you can be pretty sure that it is not
too much. (For sure more than 500 By.)

So if you have the critical situation, do not care about these function.
Care about you functions that are in the call sequence (CW shows them all).
If you can't judge the result from CW, then take a piece of paper and wrote
down their names. Then set the stack pragma to a low value and compile these
functions. Compiler will tell you how much stack space do they need.






- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, August 23, 2004 4:29 PM
Subject: Re: stack overflow error


> OK, I have identified the functions that are causing the stack overflow.
All of which I have no idea what it does in the program. It certainly not
any functions that I have created:
> WinSaveBits
> WinCopyRectangle
> BltCopyRectangle
> PrvGetBitInfo
> BltFindIndexes
> FrmDrawForm
>
> Any ideas why they cause an overflow? Sounds like something is wrong with
my form...
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


CW error reading memory on device

2004-08-24 Thread Lorraine Chin
Does anyone know why I'm getting "error reading memory on device" whenever 
I try to set a breakpoint using the CodeWarrior debugger?  I'm debugging 
over the USB port to a Tungsten T3.  I had been working with a T2 that ran 
the same application and same CodeWarrior without any problems.  I'm using 
CW 9.3 on Windows 2000 and the T3 is running an application built on Palm 
OS 5.3

Thanks in advance,
Lorraine
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Debugging

2004-08-24 Thread Ben Combee
At 09:30 AM 8/24/2004, you wrote:
I think I have a related problem. I also use PODS.
The Simulators, the emulator and the COM ports appear in the debug and run 
dialogs BUT how do I add a another target device? e.g. the Treo 600 orange 
simulator.
You can add additional simulator targets by going to Window/Preferences, 
going to the Palm OS Development/Target Environment Settings panel, and 
adding a new configuration under the appropriate category.

-- Ben Combee, DTS technical lead, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Palm Newbie needs help

2004-08-24 Thread Ben Combee
At 06:01 AM 8/24/2004, you wrote:
Hi there,
After recently purchasing new Treo 600 phones, and with my background as a 
computer game programmer (PSX, Saturn & PC), I thought I'd give 
programming the 600 a go.

I've had nothing but trouble with it over the last week - I know that this 
has probably been covered a load of times, but I can't find the problems 
in the knowledge base. I'm using the eclipse stuff from this site.

Even the simplest stuff is failing - My problems are as follows:
1)  The Garnet simulator doesn't work when I call BmpCreate. The header is 
written 16 bytes away from the returned pointer and the bitmap itself is 
not refreshed to white - this is not the documented result - and the 
simulator also crashes when I try to write to the bitmap data.
BmpCreate does work.  However, on Palm OS 5, you can't directly access the 
data structures used by the OS.  Instead, you should use the SDK and glue 
library calls (BmpGlue.h and Bitmap.h) to handle accessing this data.

2)  After giving up on the simulator, I find that the emulator works as 
expected - even the debugger returns accurate results. The problem here 
is, I can't get the emulator to use the skins, the handspring site appears 
to have disappeared and all the generic skins are monochrome emulations. 
The emulator also doesn't have an OS 5 ROM with it.

I suppose the question is, how do I set up a good debug environment for a 
low density palm OS 5 device in 65536 colours?
The Palm OS Emulator can't emulate an OS 5 device.  It can only emulate 
68K-based devices.  For a 16-bit color, low-density device, you need to get 
a ROM image for a m505 or equivalent.  These are available from the 
developer program at http://www.palmsource.com/developers/

If you're doing game development, especially for Palm OS 5, you might want 
to look at using a library like Razor or GapiDraw.  See 
http://flippinbits.com/twiki/bin/view/Main/DevelopmentToolsList for a good 
list of tools and libraries.

-- Ben Combee, DTS technical lead, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


How to draw low density bmp on high density display?

2004-08-24 Thread George VS
Hi group,

I have a low density bitmap I wish to draw on high density display without
being scaled.
Can anyone tell me how is this done?

I tried:

WinSetScalingMode (kBitmapScalingOff);
WinDrawBitmap(bmpP, x, y);

but this has none effect ?!

When the bitmap uses version3 bmp format, the blitter properly selects
high-density bitmap and renders it as I wish.

So, how can a 160x160 pix bitmap be rendered on left top portion of the
screen on high density display devices?

Thanks!
  George VS ([EMAIL PROTECTED])



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Debugging

2004-08-24 Thread Mark Rabjohn
I think I have a related problem. I also use PODS.

The Simulators, the emulator and the COM ports appear in the debug and run dialogs BUT 
how do I add a another target device? e.g. the Treo 600 orange simulator.

Cheers,

Mark
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Palm Newbie needs help

2004-08-24 Thread Mark Rabjohn
Hi there,

After recently purchasing new Treo 600 phones, and with my background as a computer 
game programmer (PSX, Saturn & PC), I thought I'd give programming the 600 a go.

I've had nothing but trouble with it over the last week - I know that this has 
probably been covered a load of times, but I can't find the problems in the knowledge 
base. I'm using the eclipse stuff from this site.

Even the simplest stuff is failing - My problems are as follows:

1)  The Garnet simulator doesn't work when I call BmpCreate. The header is written 16 
bytes away from the returned pointer and the bitmap itself is not refreshed to white - 
this is not the documented result - and the simulator also crashes when I try to write 
to the bitmap data.

2)  After giving up on the simulator, I find that the emulator works as expected - 
even the debugger returns accurate results. The problem here is, I can't get the 
emulator to use the skins, the handspring site appears to have disappeared and all the 
generic skins are monochrome emulations. The emulator also doesn't have an OS 5 ROM 
with it.

I suppose the question is, how do I set up a good debug environment for a low density 
palm OS 5 device in 65536 colours?

Thanks for any advice you guys can give.

Cheers,

Mark Rabjohn
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: nilEvent Timing

2004-08-24 Thread Douglas Handy
Greg / Geoff,

>You don't normally get a nilEvent unless you call EvtGetEvent() with a 
>finite timeout value 

That is not necessarily true, you can get them under other conditions as well.
What is true is that the above is one of the reasons a nilEvent may occur.  

For example, if there is a field object with the focus you will notice there are
nilEvents which coincide with the flashing of the insertion point, assuming the
insertion point is not disabled.

>If you call EvtGetEvent() with a timeout of, say, 10 ticks, and it 
>returns a nilEvent, you know that you're getting the event exactly 10 ticks 
>after making the call.

No, you don't know that.  You know that it is not more than about 10 ticks after
making the call.  It is possible to be seeing a nilEvent due to something else
earlier than that.  It should also be pointed out that the nilEvent won't occur
in another event appears in the queue first, so this doesn't make for a way to
guarantee smooth animations.

>The typical way of getting something to happen exactly when you want it to is:

As Chris mentioned, I'd suggest looking at the source to reptiods.

Doug

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


plz help me out

2004-08-24 Thread waqar shams
hi every one
 i am new in the feald and spend couple of weaks i need a 
freand who can help me out in my project will some one like to 
be.
if any one have developed wireless MIS application  plz tell me
   "is it possible to develop MIS application for wireless 
client/server based PDAs application in VB.Net. if so then plz refer me to 
the documentation that will help me"
I will be cardialy thankfull to that person





http://hmail.flamingtext.com/hmail/2003/04/17/flamingtext_com_1050563525_30254.gif"; 
border=0 alt="Image by FlamingText.com">
Image by http://www.flamingtext.com/hmail2.html"; 
>FlamingText.com


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


re: SD Card slot

2004-08-24 Thread Harry
Try this: when you receive the notification you simply preempt the OS by setting the 
application switching as already handled.

In StarterPalmMain:

switch (cmd) {
  case sysAppLaunchCmdNotify:
if ( notifyP->notifyType==sysNotifyVolumeMountedEvent )
  notifyP->handled = vfsHandledUIAppSwitch | vfsHandledStartPrc;
  break;
  }
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


RE: Unicode

2004-08-24 Thread Y Rekha
If you want the converted string in any of the formats other than UTF-8,
UCS-2, UTF-16LE, or UTF-16BE, you have to do the conversion yourself.
Lots of free conversion algorithms are available in the web which can be
used for the conversion.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ritu
Chawla
Sent: Tuesday, August 24, 2004 12:23 PM
To: Palm Developer Forum
Subject: Unicode

Hi All,
I need to create a localization application which should support
following
languages
"French, Italian, Spanish, English, German, Simplified Chineese"
I need to send the send some strings to the server which should be in
UNICODE.
How can i make sure that string that goes to server is always in
UNICODE.

I had tried following approach
Get current encoding using FtrGet
and then convert the string to UNICODE string using following api
TxtConvertEncoding

This is enough ? or do i need to call some other APi's to do so.

rgds,
Ritu



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


re: DmFindRecordByID error

2004-08-24 Thread Kyle Dorian
Ok, I've solved my own problem.  It seems that a record may have a unique ID with a 
maximum of 24 bits (i.e. 16777215), despite passing in a UInt32.  So annoying...and 
the only place in the documentation to find it is by looking at the SortRecordInfoType 
structure to find that the uniqueID is an array of 3 UInt8 objects.

- Kyle
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/