CharPtr dayStr=MemPtrNew(2); // 2 digits in day #
charPtr monthStr=MemPtrNew(2); // 2 digits in month #
charPtr yearStr=MemPtrNew(4); // 4 digits in year
// your code here...
StrIToA(dayStr, day);
StrIToA(monthStr, month);
StrIToA(yearStr, year);
whichButton = FrmCustomAlert( DisplayDateAlert, monthStr, dayStr, yearStr);
MemPtrFree(dayStr);
MemPtrFree(monthStr);
MemPtrFree(yearStr);
alternatively, you could set up arrays for the text of the month, day, &
year which you could pass directly...
on 8/24/01 11:49, Johnathan Smith at [EMAIL PROTECTED] wrote:
> Can you send me a sample how?
>
>
> --- Tom Hoelscher <[EMAIL PROTECTED]> wrote:
>> That function takes a Word, and 3 CharPtrs as
>> parameters. You appear to be
>> passing it a word, and 3 shorts.
>>
>> You should either use StrIToA(charPtr, short) to
>> convert the numbers into a
>> 0-terminated c-string, or pass the text version of
>> those fields.
>>
>>
>> on 8/24/01 11:16, Johnathan Smith at
>> [EMAIL PROTECTED] wrote:
>>
>>> I am displaying a calander and letting the user
>> pick a
>>> date if the user picks a display I am trying to
>>> display a AlertForm showing him the date but I am
>>> getting the following error
>>>
>>> Error : illegal implicit conversion from 'short'
>> to
>>> 'const char *'
>>> Starter.cpp line 233 whichButton =
>>> FrmCustomAlert( DisplayDateAlert, month, day, year
>> );
>>>
>>> Below is my source code. please help
>>>
>>>
>>>
>>> int whichButton;
>>>
>>> if (SelectDay (selectDayByDay, &month, &day,
>> &year,
>>> titleP))
>>> {
>>> dueDateP->day = day;
>>> dueDateP->month = month;
>>> dueDateP->year = year - firstYear;
>>> whichButton = FrmCustomAlert( DisplayDateAlert,
>>> month, day, year );
>>>
>>> }
>>>
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Make international calls for as low as $.04/minute
>> with Yahoo! Messenger
>>> http://phonecard.yahoo.com/
>>
>>
>> -Tom Hoelscher
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> "Original Sin is hard to find, but the digitally
>> enhanced version is readily
>> available".
>>
>>
>> --
>> For information on using the Palm Developer Forums,
>> or to unsubscribe, please see
> http://www.palmos.com/dev/tech/support/forums/
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
-Tom Hoelscher
~~~~~~~~~~~~~~~~~~~~~~~~~~
"Original Sin is hard to find, but the digitally enhanced version is readily
available".
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/