Re: Truncate a string

2004-08-25 Thread Geoffrey
Thank's so much, I am looking for WinDrawTruncChars exactly.

Geoffrey



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


Re: NONEDITABLE field.

2004-08-25 Thread Rudla Kudla
How did your user manage to input the data into noneditable field?

Rudla

"Abid Velshi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi All,
>
> Does anybody know of any problems that might occur if one were to obtain a
> text pointer from a NONEDITABLE field?
>
> I seem to be getting the string "\n\b" from a field which the user has
> inputted numeric data.  The function which I use to obtain this string is:
>
> FldGetTextPtr()
>
> Using the same function, I am able to obtain text from an EDITABLE field.
>
> Any help would be much appreciated.
>
> Thanks,
> Abid
>
>



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


Re: EvtEventAvail problem

2004-08-25 Thread Rudla Kudla
It is generated repeatedly.
The loop, as it is written bellow, never ends.

Meanwhile, I solved the problem by using EvtGetEvent(&event, 0), which works
correctly.
I would however still like to know, if this is some bug in OS, or if i do
not understand the
API correctly.

Rudla

"Tim Kostka" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Are you saying the penUpEvent is being generated repeatedly or just once
> before the start of the loop?  If it's just generated once, your device
> should go into snooze after one pass of the loop, and thus no problem.
>
> --
> Tim Kostka
> http://www.nuprograms.com
>
>
> "Rudla Kudla" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> >
> > a have problem with EvtEventAvail.
> > I read data from serial port and have Form with Cancel button open.
> > I want to cancel the reading, when the button is pressed.
> >
> > I test, if there is an event using EvtEventAvail.
> > If it is a perform SysHandleEvent and possibly FrmHandleEvent.
> >
> > Code for the progress function follows.
> >
> > It works OK on POSE. At real device (m515), it seems, that there is
ALWAYS
> > some event (event.eType == 2)
> > (Seems like penUp).
> >
> > How should I solve this problem?
> >
> > Rudla
> >
> > static Err CheckReadProgress(UInt32 bytes_to_now) /*
> >
> > Purpose:
> >
> > Serial port PortReadData progress function.
> >
> > Returns cancel, if the user pushed some button.
> >
> > */{
> >
> > UInt16 event_limit;
> >
> > UInt8 buffer[100];
> >
> > EventType event;
> >
> >
> > StrPrintF(buffer, "S:%ld", bytes_to_now);
> >
> > WinDrawChars(buffer, StrLen(buffer), 0,12);
> >
> > event_limit = 5;
> >
> > while (event_limit-- > 0 && EvtEventAvail()) {
> >
> > EvtGetEvent(&event, evtWaitForever);
> >
> >
> > ReportSubmessageInt("Event: %ld", event.eType);
> >
> >
> > if (event.eType == ctlSelectEvent) {
> >
> > return ErrUserCancel;
> >
> > }
> >
> > if (!SysHandleEvent(&event)) {
> >
> > FrmDispatchEvent(&event);
> >
> > }
> >
> > }
> >
> > return 0;
> >
> > }
> >
> >
> >
>
>
>



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


Re: Truncate a string

2004-08-25 Thread Ben Combee
At 11:12 PM 8/25/2004, you wrote:
Hi all,
May I ask if there are any existing API to truncate a string when the string
is too long, like this:
This is a very very very long string  ==> This is a very very ...
I know I can use StrLen and StrNCopy to do the same things, but I suspected
there must be some exsiting APIs to do this.
Hmmm... how do define too long?
There are APIs to draw a truncated string on the screen -- 
WinDrawTruncChars comes to mind.  To find the number of characters that can 
fit in a horizontal width, FntCharsInWidth is also useful.

-- 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: Truncate a string

2004-08-25 Thread Greg Lutz
At 09:12 PM 8/25/2004, "Geoffrey" <[EMAIL PROTECTED]> wrote:
Hi all,
May I ask if there are any existing API to truncate a string when the string
is too long, like this:
This is a very very very long string  ==> This is a very very ...
I know I can use StrLen and StrNCopy to do the same things, but I suspected
there must be some exsiting APIs to do this.
Can anyone give me some hints?
Well, there's WinDrawTruncChars for just doing the ellipsis. If you're also 
interested in finding a line break, there is FntWordWrap.  Various other 
Palm OS functions deal with this problem from different angles.  And don't 
forget the humble ChrHorizEllipsis, the "right" way of getting your hands 
on an ellipsis character. 

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


Re: C++ Templates.

2004-08-25 Thread Greg Lutz
At 07:06 PM 8/25/2004, UCS308 wrote:
I have some source code that implements Observer Notifier in C++ making 
heavy use of templates.

While trying to compile it I get a lot (hundreds) of errors. I cannot tell 
if this is a compiler issue, configuration issue, or if it is just too 
hard for Codewarrior. Everything compiles well on Windows.

Does anybody have any experience with Templates on CodeWarrior 9.0 ( I am 
using 9.2) for the the Palm?  Would you be willing to take the source ( 1 
example file, 1 header) and see if  you can get it to compile?

I am not asking you to fix broken code, just tell me if this should 
compile under 9.2
I generally find the CodeWarrior C++ compiler to be more standard-compliant 
(and capable) than, say, Visual C++.  We use templates moderately 
extensively in our Palm code.  Yes, I would be willing to see whether it 
compiles on my system.

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


Truncate a string

2004-08-25 Thread Geoffrey
Hi all,

May I ask if there are any existing API to truncate a string when the string
is too long, like this:

This is a very very very long string  ==> This is a very very ...

I know I can use StrLen and StrNCopy to do the same things, but I suspected
there must be some exsiting APIs to do this.
Can anyone give me some hints?

Cheers,
Geoffrey



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


C++ Templates.

2004-08-25 Thread UCS308
I have some source code that implements Observer Notifier in C++ making heavy use of 
templates. 

While trying to compile it I get a lot (hundreds) of errors. I cannot tell if this is 
a compiler issue, configuration issue, or if it is just too hard for Codewarrior. 
Everything compiles well on Windows. 

Does anybody have any experience with Templates on CodeWarrior 9.0 ( I am using 9.2) 
for the the Palm?  Would you be willing to take the source ( 1 example file, 1 header) 
and see if  you can get it to compile? 

I am not asking you to fix broken code, just tell me if this should compile under 9.2

Thanks.

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


Re: Changing the name of the project

2004-08-25 Thread Merav Rubinstein
Thank you! I've found it!
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Changing the name of the project

2004-08-25 Thread Ben Combee
At 07:58 PM 8/25/2004, you wrote:
Thank you for your answer. I work with the CodeWarrior and the consturctor 
and still couldn't find where to change it...
It's in the application resource settings that Constructor shows at the 
bottom of the resource hierarchy window for your .rsrc file.

-- 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: Changing the name of the project

2004-08-25 Thread Merav Rubinstein
Thank you for your answer. I work with the CodeWarrior and the consturctor and still 
couldn't find where to change it...

Thank you in advanced for your help.
Merav


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


Unable to HotSync

2004-08-25 Thread amir syed
   August 25 
Hi all,
   I am unable to HotSync from my m100 to desktop.Hotsync Log on
 m100 reads "HotSync operation was terminated.Some of you data was
 not backed up.
 An application on the PC failed to respond to a 
 confimation query.The application may need to be restarted."
  HotSync log on desktop reads "HotSync error:An application
  failed to respond  to a HotSync notification."
   How do I correct this to HotSync.

  Thanks in advance 

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


NONEDITABLE field.

2004-08-25 Thread Abid Velshi
Hi All,

Does anybody know of any problems that might occur if one were to obtain a
text pointer from a NONEDITABLE field?

I seem to be getting the string "\n\b" from a field which the user has
inputted numeric data.  The function which I use to obtain this string is:

FldGetTextPtr()

Using the same function, I am able to obtain text from an EDITABLE field.

Any help would be much appreciated.

Thanks,
Abid


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


Re: Error : the file 'Windows.h' cannot be opened

2004-08-25 Thread Ben Combee
At 04:59 PM 8/25/2004, you wrote:
Hello,
While trying to use the WinScreenMode ()  function on the Palm Emulator
with 4.2 ROM, I am getting the following error:
 "Error   : the file 'Windows.h' cannot be opened"
You mean when trying to compile your program, right?
You don't need to manually include , since it's pulled in by 
.  However, it seems likely that your project is misconfigured 
and pulling in the wrong set of header files.  Make sure your system access 
paths include

{Compiler}Palm OS Support
{Compiler}CW for Palm OS Support
in that order, and before any other paths.  Remove any path that is just
{Compiler}
as that is really inefficient and can pull in things you don't want.
-- 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/


Error : the file 'Windows.h' cannot be opened

2004-08-25 Thread Jennifer Fell
Hello,

While trying to use the WinScreenMode ()  function on the Palm Emulator
with 4.2 ROM, I am getting the following error:
 "Error   : the file 'Windows.h' cannot be opened"

I am using Code Warrior. Any idea what my mistake is?

Thanks,
Jenni

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


Palm V serial woes

2004-08-25 Thread Bill
Palm claims "true RS-232 levels" on most of their palms, but the V i have produces 
only about +/-5V. Is there a reference for exact level outputs per device. Does anyone 
have experience with the 

BTW, the device im connected to requires port power derived from DTR||RTS and RX||RTS. 
Ive found the V does provide power on these pins at +5V and -3V respectively. The V 
simply is not driving the optocouplers of the device hard enough. Works find with an 
emulator on the PC...

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


Re: Changing the name of the project

2004-08-25 Thread Ben Combee
At 03:16 PM 8/25/2004, you wrote:
Hello,
I think I've done with the development! and now I would like the icon to 
have another name instead of "MyProject", can I do that?
Alter the icon name resource.  What tool are you using?  If it's 
CodeWarrior, this is either specified in your main .rsrc file, in your .rcp 
file, or in the Palm OS 68K Project pref panel.

-- 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/


transfering pdb file to desktop

2004-08-25 Thread Keyur Patwa

Hi guys,

Can anyone tell me how I can transfer a database (pdb) file from the device
to my desktop?

I tried to play with the Hotsync options but couldn't find the clue!

Thanks,
Keyur.




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


palmgear activities

2004-08-25 Thread palmDev
does anyone notice how palmgear is ripping developers off?
an example. they have this go for the gold 25% off if you purchase 2
or more titles for them.

this is great for customers but not for developers.  it appears to me
that the 25% is taken off directly from the developer and then palmgear
applies
their 30% - 40% commission.



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


Changing the name of the project

2004-08-25 Thread Merav Rubinstein
Hello,
I think I've done with the development! and now I would like the icon to have another 
name instead of "MyProject", can I do that?

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


palm game programming books?

2004-08-25 Thread geoff
Are there not any good palm game programming books availble somewhere. There
is one palm game prog. book  but its average user rating on amazon is like 1
star. Anybody have any recommendations for books or even internet resources?

Thanks, Geoff

-- 
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-25 Thread Robert Moynihan
[EMAIL PROTECTED] wrote:
I have done the MemPtrNew function:
ComDB *myData = (ComDB*) MemPtrNew (sizeof(ComDB));
StrCopy(myData->com1, "test");
then...code to save the records *snip*
MemPtrFree(myData);
When I run the program on POSE, the following message pops up.
"MyProgram just read from memory location 0x000392E2 which is a in Memory Mgr data 
stuctures.
These data structures include things like the headers preceding each block in heap, as well 
as the heap header itself. Such an access usually means that an application allocated a 
buffer (possibly with MemPtrNew) that wasn't large enough for its purpose. When the 
application then tries to write data to the buffer, it writes off the end of the buffer, 
accessing the start of the buffer following it in memory. "
Then i click continue and i see that the data has been saved on myAlert. I guess I 
didnt have an error. But is this message warning me of an error? or is it only 
informational?
 

Once you allocate the memory you then have to make sure that all of your 
reads/writes stay within the bounds of that allocated memory.  Let's 
suppose that your structure contains nothing but the following:

Char com1[4];
When allocating the structure, you have only set aside enough room for 4 
bytes.  The subsequent StrCopy command will copy 5 bytes (4 characters 
and a NULL at the end) to the structure, so it has then just written 4 
characters to myData->com1 (OK), but it also wrote the trailing NULL 
outside of the structure (bad).  This will give you the error message, 
and it may or may not crash the device.

Check to make sure that all your reads/writes stay within the bounds.
Bob.
--
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-25 Thread JohnAb24
I have done the MemPtrNew function:
ComDB *myData = (ComDB*) MemPtrNew (sizeof(ComDB));
StrCopy(myData->com1, "test");
then...code to save the records *snip*
MemPtrFree(myData);

When I run the program on POSE, the following message pops up.

"MyProgram just read from memory location 0x000392E2 which is a in Memory Mgr data 
stuctures.

These data structures include things like the headers preceding each block in heap, as 
well as the heap header itself. Such an access usually means that an application 
allocated a buffer (possibly with MemPtrNew) that wasn't large enough for its purpose. 
When the application then tries to write data to the buffer, it writes off the end of 
the buffer, accessing the start of the buffer following it in memory. "

Then i click continue and i see that the data has been saved on myAlert. I guess I 
didnt have an error. But is this message warning me of an error? or is it only 
informational?

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


Updating currupted PRCs

2004-08-25 Thread Desenvolvimento 3
Hi folks!

I wrote a updater system by FTP for PalmOS. I have a server where I put all
the programs I want to update and the client using a PalmModem connect to it
by FTP. The problem occours when the connection falls down while a
downloading was performing, the PRC got corrupted in the client´s machine
and, sometimes, we have to hard reset the machine to back normal.

So, I need a way to doesn´t accept a corrupted PRC even we lost the
downloading.

Does anyone have any idea?

Thanks

Ricardo

--
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-25 Thread will rogers
Wow.  Completely missed that.
Many thanks, Ben.
Perhaps that could be added the docs (which I really did spend an 
excruciating amount of time searching for this).

My suggestion would be in the
"Treo 600 Developer Guide"
Ch.29:  "Debugging the Treoo 600 Smartphone by palmOne"
section: "Treo 600 by palmOne version of the Palm-Simulator"
as this is the section which addresses differences between this 
version of the simulators and others.

(If you forward an enhancement request email address, I'll submit a request.)
Thanks again.
--
PS to Nikolai:
Thank you for pointer and witty insight.
I am obviously very stupid.
I should not have expected to find something like this in an updated 
version of the "Treo 600 Developer Guide".

I should not have expected to find it in something as unrelated as a 
document named "simulator usage notes.txt" or 
"TestingWithSimulator.pdf"

I should instead read in detail a document named 
"Treo600_Simulator_History.txt" that directs me to the "Treo 600 
Developer Guide" for more information before mentioning this feature.

Thank heavens there is a support forum like this for doltish morons 
like myself.

-

 On 2004-08-24 17:29:50 -0400, Ben Combee <[EMAIL PROTECTED]> said:
 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/

--
==
  Will Rogers[EMAIL PROTECTED]
==
--
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-25 Thread Douglas Handy
Edan,

>in your loop you can call TimGetSeconds and compare it ...

Correct.  I was trying to elaborate a little, because to me this:

>I force nil events to happen so I can get accurate timing.
>just use:  EvtSetNullEventTick

implies that the nilEvents would then yield accurate timing without doing any
other tests.

Doug

-- 
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-25 Thread Edan
Doug,

I agree with you.. but in your loop you can call TimGetSeconds and compare it with the 
last time it was in the loop and then you can only act on the events that take place 
every second or every 2 seconds.. you only need to make sure that you set the null 
events resolution to less than or equal to the number of seconds you want to act upon. 

as I said.. i dont know if this is the best way.. but it worked for me.

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


Re: big object allocation (was MTWK::__LoadAndRelocate__ problem)

2004-08-25 Thread Chris Apers
Just fixed it useing :

#include "MemGlue.h"

void *operator new(UInt32 size) {
 void *ptr = MemGluePtrNew(size);
 MemSet(ptr, 0, size);
 return ptr;
}


- Original Message - 
From: "Chris Apers" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 4:22 PM
Subject: Re: big object allocation (was MTWK::__LoadAndRelocate__ problem)


> Ok, i found the problem, i'm allocation a big object (71k)
> with the new operator and it failed.
>
> Any way to allocate a big object (override the new operator)
> with all constructor call ?
>
> Thanks a lot
> Chris
>
>
> - Original Message - 
> From: "Chris Apers" <[EMAIL PROTECTED]>
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Wednesday, August 25, 2004 2:58 PM
> Subject: MTWK::__LoadAndRelocate__ problem
>
>
> > Hi,
> >
> > When i run my program i have a :
> > Invalid read from 4F18
> >
> > The debugger stack shows :
> > __Startup__
> > MTWK::__LoadAndRelocate__(unsigned char,__opaque*)
> >
> > Source :
> > ...
> > ...
> > 03298038: 2F0Amove.l   a2,-(a7)
> > 0329803A: 4E4Ftrap #15
> > 0329803C: A022sysTrapMemHandleUnlock
> > 0329803E: 584Faddq.w   #4,a7
> > 03298040: 7010moveq#16,d0
> > 03298042: D880add.ld0,d4
> > 03298044: 5246addq.w   #1,d6
> > 03298046: 2044movea.l  d4,a0
> > 03298048: 4AA80004tst.l4(a0)
> > stop > 0329804C: 66D6bne.s
> MTWK::__LoadAndRelocate__(unsigned
> > char,_opaque*)+0x1b74 (0x3298024); 0x03298024
> > 0329804E: 4CDF0CF8movem.l  (a7)+,d3-d7/a2-a3
> > 03298052: 4E5Eunlk a6
> > 03298054: 4E75rts
> >
> > Any idea ? Thanks !
> > Chris
> >
> > -- 
> > 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/
>

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


Re: big object allocation (was MTWK::__LoadAndRelocate__ problem)

2004-08-25 Thread Benjamin Roe
Somebody else has probably said this already, but why are you allocating 
a 71Kb object to start with? That must be one ugly looking object. 
Wouldn't it be better to look at breaking down the object into smaller 
parts rather than trying to use non-standard memory allocation to get 
round the problem?

AFAIK, it is possible to use Feature memory on more recent PalmOS 
versions to allocate larger chunks, but that wouldn't be portable to 
older handhelds.

Just my £0.02,
Ben Roe
Chris Apers wrote:
Ok, i found the problem, i'm allocation a big object (71k)
with the new operator and it failed.
Any way to allocate a big object (override the new operator)
with all constructor call ?
Thanks a lot
Chris
- Original Message - 
From: "Chris Apers" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 2:58 PM
Subject: MTWK::__LoadAndRelocate__ problem

 

Hi,
When i run my program i have a :
Invalid read from 4F18
The debugger stack shows :
__Startup__
MTWK::__LoadAndRelocate__(unsigned char,__opaque*)
Source :
...
...
03298038: 2F0Amove.l   a2,-(a7)
0329803A: 4E4Ftrap #15
0329803C: A022sysTrapMemHandleUnlock
0329803E: 584Faddq.w   #4,a7
03298040: 7010moveq#16,d0
03298042: D880add.ld0,d4
03298044: 5246addq.w   #1,d6
03298046: 2044movea.l  d4,a0
03298048: 4AA80004tst.l4(a0)
stop > 0329804C: 66D6bne.s
   

MTWK::__LoadAndRelocate__(unsigned
 

char,_opaque*)+0x1b74 (0x3298024); 0x03298024
0329804E: 4CDF0CF8movem.l  (a7)+,d3-d7/a2-a3
03298052: 4E5Eunlk a6
03298054: 4E75rts
Any idea ? Thanks !
Chris
--
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: big object allocation (was MTWK::__LoadAndRelocate__ problem)

2004-08-25 Thread Chris Apers
Ok, i found the problem, i'm allocation a big object (71k)
with the new operator and it failed.

Any way to allocate a big object (override the new operator)
with all constructor call ?

Thanks a lot
Chris


- Original Message - 
From: "Chris Apers" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 2:58 PM
Subject: MTWK::__LoadAndRelocate__ problem


> Hi,
>
> When i run my program i have a :
> Invalid read from 4F18
>
> The debugger stack shows :
> __Startup__
> MTWK::__LoadAndRelocate__(unsigned char,__opaque*)
>
> Source :
> ...
> ...
> 03298038: 2F0Amove.l   a2,-(a7)
> 0329803A: 4E4Ftrap #15
> 0329803C: A022sysTrapMemHandleUnlock
> 0329803E: 584Faddq.w   #4,a7
> 03298040: 7010moveq#16,d0
> 03298042: D880add.ld0,d4
> 03298044: 5246addq.w   #1,d6
> 03298046: 2044movea.l  d4,a0
> 03298048: 4AA80004tst.l4(a0)
> stop > 0329804C: 66D6bne.s
MTWK::__LoadAndRelocate__(unsigned
> char,_opaque*)+0x1b74 (0x3298024); 0x03298024
> 0329804E: 4CDF0CF8movem.l  (a7)+,d3-d7/a2-a3
> 03298052: 4E5Eunlk a6
> 03298054: 4E75rts
>
> Any idea ? Thanks !
> Chris
>
> -- 
> 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: stack overflow error

2004-08-25 Thread Robert Moynihan
John, the important thing to remember it that when you define a 
structure like...
  ComDB abc;
...it sets aside enough STACK space to hold the whole structure when 
your program tries to run.  In fact, if you declare other instances of 
this structure in a whole bunch of places then the stack usage will grow 
and grow.
The problem is that the stack size is dependant on the device, and it is 
a small fraction of the total available memory.

If, instead, you do what Jan suggsests, and only declare a pointer to 
the structure (*abc), then the stack only holds the pointer, which is 
just a 4-byte address.  Then, at runtime, you have to dynamically 
allocate enough memory to hold the structure.  This is the MemPtrNew 
command.  This dynamic allocation uses the data heap, and it is usually 
capable of holding much larger structures, depending on how much stuff 
is already loaded on the device.

Does that make sense?  Bob.
Jan Slodicka wrote:
1. How can I decrease the stack usage for this function. How would I use the
MemPtrNew to allocate it in the heap instead of the stack?
Instead of
   ComDB abc ;
use
   ComDB *abc = (ComDB*)MemPtrNew( sizeof(ComDB) ) ;
   ...
   MemPtrFree( abc ) ;
2.
yes - as above
 


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


RE: [spam] stack overflow error

2004-08-25 Thread Mark Rabjohn
> 2. Also, this is the struct that I think is causing the stack overflow. It
is in the SaveFormDoCommand that I try to fill it up with data. I believe
that
> if I can reduce its stack usage, my problem is solved. Can aI lso use
MemPtrNew to allocate this struct in the heap instead of the stack? If so,
how can I
> go about it?

> typedef struct{
> char com1[30];
> ** snip **
> char com60[30];
> char com61[30];
> } ComDB;

I'm just guessing here being a Palm newbie, but since the usual C API way is
to do:

ComDB * mysavestruct = (ComDB*)malloc(sizeof(ComDB));

Then therefore the MemPtrNew way would be:

ComDB * mysavestruct = (ComDB*)MemPtrNew(sizeof(ComDB));

You'd access the variables using the -> operator i.e.

mysavestruct->com1[0]=0;

instead of:

mysavestruct.com1[0]=0;


If I'm wrong, I hope someone puts me right 'cos I'm bound to come across
this shortly.

Doesn't malloc() work in Palm like on all the other API sets?


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-25 Thread Jan Slodicka
1. How can I decrease the stack usage for this function. How would I use the
MemPtrNew to allocate it in the heap instead of the stack?

Instead of
ComDB abc ;
use
ComDB *abc = (ComDB*)MemPtrNew( sizeof(ComDB) ) ;
...
MemPtrFree( abc ) ;

2.
yes - as above


- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 3:40 PM
Subject: Re: stack overflow error


> Many thanks for all your help.
>
> I have set the stack pragma and I received the following compiler warning
message: 'function SaveFormDoCommand uses 2140 of stack'
>
> 1. How can I decrease the stack usage for this function. How would I use
the MemPtrNew to allocate it in the heap instead of the stack?
>
> 2. Also, this is the struct that I think is causing the stack overflow. It
is in the SaveFormDoCommand that I try to fill it up with data. I believe
that if I can reduce its stack usage, my problem is solved. Can aI lso use
MemPtrNew to allocate this struct in the heap instead of the stack? If so,
how can I go about it?
>
> typedef struct{
> char com1[30];
> char com2[30];
> char com3[30];
> char com4[30];
> char com5[30];
> char com6[30];
> char com7[30];
> char com8[30];
> char com9[30];
> char com10[30];
> char com11[30];
> char com12[30];
> char com13[30];
> char com14[30];
> char com15[30];
> char com16[30];
> char com17[30];
> char com18[30];
> char com19[30];
> char com20[30];
> char com21[30];
> char com22[30];
> char com23[30];
> char com24[30];
> char com25[30];
> char com26[30];
> char com27[30];
> char com28[30];
> char com29[30];
> char com30[30];
> char com31[30];
> char com32[30];
> char com33[30];
> char com34[30];
> char com35[30];
> char com36[30];
> char com37[30];
> char com38[30];
> char com39[30];
> char com40[30];
> char com41[30];
> char com42[30];
> char com43[30];
> char com44[30];
> char com45[30];
> char com46[30];
> char com47[30];
> char com48[30];
> char com49[30];
> char com50[30];
> char com51[30];
> char com52[30];
> char com53[30];
> char com54[30];
> char com55[30];
> char com56[30];
> char com57[30];
> char com58[30];
> char com59[30];
> char com60[30];
> char com61[30];
> } ComDB;
>
>
> Thanks in Advance.
>
>
> -- 
> 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: stack overflow error

2004-08-25 Thread JohnAb24
Many thanks for all your help.

I have set the stack pragma and I received the following compiler warning message: 
'function SaveFormDoCommand uses 2140 of stack'

1. How can I decrease the stack usage for this function. How would I use the MemPtrNew 
to allocate it in the heap instead of the stack?

2. Also, this is the struct that I think is causing the stack overflow. It is in the 
SaveFormDoCommand that I try to fill it up with data. I believe that if I can reduce 
its stack usage, my problem is solved. Can aI lso use MemPtrNew to allocate this 
struct in the heap instead of the stack? If so, how can I go about it?

typedef struct{
char com1[30];
char com2[30];
char com3[30];
char com4[30];
char com5[30];
char com6[30];
char com7[30];
char com8[30];
char com9[30];
char com10[30];
char com11[30];
char com12[30];
char com13[30];
char com14[30];
char com15[30];
char com16[30];
char com17[30];
char com18[30];
char com19[30];
char com20[30];
char com21[30];
char com22[30];
char com23[30];
char com24[30];
char com25[30];
char com26[30];
char com27[30];
char com28[30];
char com29[30];
char com30[30];
char com31[30];
char com32[30];
char com33[30];
char com34[30];
char com35[30];
char com36[30];
char com37[30];
char com38[30];
char com39[30];
char com40[30];
char com41[30];
char com42[30];
char com43[30];
char com44[30];
char com45[30];
char com46[30];
char com47[30];
char com48[30];
char com49[30];
char com50[30];
char com51[30];
char com52[30];
char com53[30];
char com54[30];
char com55[30];
char com56[30];
char com57[30];
char com58[30];
char com59[30];
char com60[30];
char com61[30];
} ComDB;


Thanks in Advance.


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


MTWK::__LoadAndRelocate__ problem

2004-08-25 Thread Chris Apers
Hi,

When i run my program i have a :
Invalid read from 4F18

The debugger stack shows :
__Startup__
MTWK::__LoadAndRelocate__(unsigned char,__opaque*)

Source :
...
...
03298038: 2F0Amove.l   a2,-(a7)
0329803A: 4E4Ftrap #15
0329803C: A022sysTrapMemHandleUnlock
0329803E: 584Faddq.w   #4,a7
03298040: 7010moveq#16,d0
03298042: D880add.ld0,d4
03298044: 5246addq.w   #1,d6
03298046: 2044movea.l  d4,a0
03298048: 4AA80004tst.l4(a0)
stop > 0329804C: 66D6bne.sMTWK::__LoadAndRelocate__(unsigned
char,_opaque*)+0x1b74 (0x3298024); 0x03298024
0329804E: 4CDF0CF8movem.l  (a7)+,d3-d7/a2-a3
03298052: 4E5Eunlk a6
03298054: 4E75rts

Any idea ? Thanks !
Chris

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


Re: Problem in Float to string conversion.

2004-08-25 Thread Dave Lippincott
Tons of code samples to convert floating point to a string have been posted
to this list.  A quick search will get you what you need.

- Original Message - 
From: "Dina" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 8:35 AM
Subject: Problem in Float to string conversion.


> Hi,
> I am using Palm OS5.0 and CW 9.3.
> Why this part of the C code doesn't work  in Palm
> OS5.0?
>
>  float a = 3.9;
>  char str[10];
>  sprintf(str,"%f",a);
>
>  I get the err  "StringMgr doesnt support this".
>
> or
>   How can I convert a float value to String??
>
> regards,
> Dina.
>
>
>
>
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> 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/


-- 
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-25 Thread Nikolai Filipov
Actually, Will, this is mentioned in the docs (Treo600Simulator_History.txt).
You have to be thankful and read any TXT files, as most other simulators 
don't have any docs. ;-)

Nikolai F.
Handshigh Tech Support
At 00:29 25.8.2004, you wrote:
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/

--
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-25 Thread Roger Stringer

Subject: Re: stack overflow error
From: [EMAIL PROTECTED]
Date: Tue, 24 Aug 2004 14:02:20 -0400
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.
What is the stack impact of these struct's  ??
Are you doing:
struct FIELD_DEF {...} fields;  /// wrong!!! , uses stack
or
struct FIELD_DEF (...) *pfields = NULL; // stack impact is 4 bytes
pfields = (struct FIELD_DEF *)
MemPtrNew (sizeof (struct FIELD_DEF) + 2);
if (pfields == NULL) {  /* handle memory error */ return -1;}
MemSet ((MemPtr)pfields, sizeof (struct FIELD_DEF) + 2, 0);
// Note defensive programming techniques
...
...
...
MemPtrFree ((MemPtr)pfields; pfields = NULL;
return 1;
Roger Stringer
Marietta Systems, Inc. (www.rf-tp.com)
--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Problem in Float to string conversion.

2004-08-25 Thread Dina
Hi,
I am using Palm OS5.0 and CW 9.3. 
Why this part of the C code doesn't work  in Palm
OS5.0?
  
 float a = 3.9;
 char str[10];
 sprintf(str,"%f",a);

 I get the err  "StringMgr doesnt support this".

or 
  How can I convert a float value to String??

regards,
Dina.




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
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: Palm OS 5 and Palm OS 4.1

2004-08-25 Thread Jan Slodicka
Not exactly remove the armlet code - you can keep both the armlet and the
m68K code and decide (based on the onARM() function bellow) which of the
codes will be applied. Naturally, you have to remove all ARM-specific things
(e.g. endian conversions) from the m68K code.

The advantage of keeping both codes together is that you have just one
distribution package. The disadvantage = increased app size.

Regards,
Jan Slodicka

Boolean onARM()
{
 UInt32 processorType;

 // get the processor type
 FtrGet(sysFileCSystem, sysFtrNumProcessorID, &processorType);
 return  sysFtrNumProcessorIsARM( processorType) ;
}


- Original Message - 
From: "Shree S" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 12:20 PM
Subject: Palm OS 5 and Palm OS 4.1


>
> Hi all,
>
>   I have developed an application for SDIO on palm OS 5.2.1. (devices
Tungsten and treo600). I have also used few armlets in my code.
> Now, I understand that if i have to run my application on palm os 4.1 i'll
have to remove the armlets.
>
> I want to know from you guys what else do i have to change to make it run
on palm 4.1. or my code will run directly without any modification(armlets
removed).
>
>
> -- 
> __
> 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/


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


What could cause exgErrBadLibrary

2004-08-25 Thread Jan Slodicka
Hello,

I got a user report stating exgErrBadLibrary error as a result of ExgPut
(probably) or ExgSend call.

The particular piece of code is used to pass the data to a registered
handler (i.e. another application).
The socket initialization:
target points to the CreatorId of the receiving app
length, time to obvious values
localMode = 1
description = some text
name = "_local:"

The code was tested by many users and seems to be ok. Hence I suspect some
strange setup of the user machine. (I asked the user, but don't have a reply
yet.)

The official Palm error official error text is "Couldn't find default
exchange library". (Or without the word "default".)

By browsing the web I found just one relevant mention
(http://www.mail-archive.com/[EMAIL PROTECTED]/msg53219.html)
where Keith Rollin admits such Palm bug in some early release of Palm OS 5.
(I believe that it is solved by now.)

Does anybody have some explanation?

Thanks in advance.

Jan Slodicka


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


Palm OS 5 and Palm OS 4.1

2004-08-25 Thread Shree S

Hi all, 

  I have developed an application for SDIO on palm OS 5.2.1. (devices Tungsten and 
treo600). I have also used few armlets in my code. 
Now, I understand that if i have to run my application on palm os 4.1 i'll have to 
remove the armlets. 

I want to know from you guys what else do i have to change to make it run on palm 4.1. 
or my code will run directly without any modification(armlets removed).

  
-- 
__
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/


Re: stack overflow error

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

Write the following line (you may select a lower threshold than 300 By) to
the source file (*.c) start or just before the function of interest.

 #pragma warn_stack_usage 300

>  However, it's still giving me a warning saying that I am 'close' to
overflowing the stack

You solved it for the time being, but it is still dangerous. Maybe you do
some change to your code in the future or the program will run on a weaker
machine with less stack space or some hack will be in the call sequence
taking part of the stack. (Other experts could judge it better...) I would
still try to decrease your stack usage.
Looks like you identified the dangerous places = the mentioned struct
instances. What about to allocate them on the heap (MemPtrNew) instead of
leaving them on the stack?

Roughly speaking stack usage in a particular function = sum of sizeof's for
all local variables. This isn't an exact statement as the compiler may do
its own decisions, but it is a good estimate.

Example:

int A()
{
char bufA[1024] ;
int a ;
//...
}

int B()
{
char bufb[1024] ;
double b  ;
//...
// (1)
A() ;// (2)
// (3)
}

(1), (3) A() takes (roughly) 1026 By of the stack,
(2) During the call 1026+1032 By of the stack space are taken.

Jan

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, August 24, 2004 8:02 PM
Subject: Re: stack overflow error


> 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/


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


re: detecting warm reset

2004-08-25 Thread Harry
I am not quite sure I understand your requirements, but maybe two helpful hints:

1. register your app. for system reset with SysNotifyRegister: every warm reset will 
go through your application

2. check TimGetTicks(): this counter is reset to 0 upon every reset.


Harry

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


Is there any telephony event when a phone call is incoming?

2004-08-25 Thread ice
Hi all,

I am developing an application that needs to detect the incoming phone
call.
To solve this, one way is to use a timer and call TelGetCallState() api
to check the telephone call state information in every timer loop.
But I wonder whether there is any event or notification sent by palm
system when a phone call is incoming. Waiting for your reply. Thank you very
much.



Best Regards,

-- Ice



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


re: VFS Fragmentation?

2004-08-25 Thread Natcho Natchev
Jeff, I believe that you are running into a VFAT cluster size problem. Each of your 
files is around 3KBytes, but I think that the cards use 16KByte clusters, thus your 
1000 files will fill in a 16MB SD card.

I am not sure if it can be done or if PalmOS would recognize it, but you can try to 
somehow reformat the card to use smaller cluster size (4K in your case).

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


Re: Seeking API to fill a non-rectangular area

2004-08-25 Thread Tom Z. Meinlschmidt
On Wed, Aug 25, 2004 at 03:27:08AM -0400 Luc Le Blanc [EMAIL PROTECTED] wrote:
> I need to fill a trapezoidal area. i.e. a rectangle with unequal sides.
> I see no API for that, nor something like "WinFillArea" that would color
> every pixel around the given start location until hitting a different
> color (like a paint tool in basic paint programs). Are there suitable
> APIs for that, or is there a graphics shared library freely available to
> do that?


Hi,
 
the best way is to tesselate the polygon (you don't care about covex/concave),
and fill all the triangles you created. Filling a triangle is simple.

/tom
> --
> Luc Le Blanc
> 
-- 
===
Tomas Meinlschmidt, SBN3, MCT, MCP, MCP+I, MCSE, NetApp Filer & NetCache
gPG fp: CB78 76D9 210F 256A ADF4 0B02 BECA D462 66AB 6F56 / $ID: 66AB6F56
GCS d-(?) s: a- C++ ULHISC*$ P+++> L+++$> E--- W+++$ N++(+) !o
!K w(---) !O !M V PS+ PE Y+ PGP++ t+@ !5 X? R tv b+ !DI D+ G e>+++
h r+++ z+++@
===

-- 
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-25 Thread Harry
How about this:
-
BitmapTypeV3*bmP3=NULL;
BitmapType  *bmP=NULL;

WinSetCoordinateSystem( kCoordinatesNative );

bmP3 = BmpCreateBitmapV3( bmP, kDensityDouble, BmpGetBits( bmP ), NULL );
WinDrawBitmap( (BitmapPtr) bmP3, x, y );

WinSetCoordinateSystem( kCoordinatesStandard );
-

This code pieces work in my app as follows:
bmp is a standard bitmap, of any dimension, or, say 320x320. It is converted into a V3 
bitmap and then draw on the screen. One bitmap pix is one screen pix then -- I assume 
that is what you need.
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Seeking API to fill a non-rectangular area

2004-08-25 Thread Luc Le Blanc
I need to fill a trapezoidal area. i.e. a rectangle with unequal sides.
I see no API for that, nor something like "WinFillArea" that would color
every pixel around the given start location until hitting a different
color (like a paint tool in basic paint programs). Are there suitable
APIs for that, or is there a graphics shared library freely available to
do that?


--
Luc Le Blanc


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