Going through 40,000 Messages on this news server would be ok; if it
permitted me to Download more than 100 manually at a time. I apologize in
advance for possibly asking something that's already out there.
This is a two stage question! (Question 1)
----------------------------------------------------------------------------
I wrote a function to basically do the following;
1. Get a string resource
2. Open a new form (basically a dialog)
3. Get the fieldID's and Pointer
4. Dump the string into the field
5. Release the string
6. Allow the user to dismiss the dialog (FrmDoDialog)
I don't need the field to be editable. I am just basically making my own
help dialog.
This code works the first time its used, and the program is fine throughout
its lifespan. When it quits to the launcher POSE starts barking at me that
APP called SysFatalAlert with the Message: "Field.c, Line 5564, Deleting dm
Handle"
If I launch the app again the field is empty and no amount of swearing will
bring the string text back ( :) )..
Source for Function below;
static void Help(void)
{
FormPtr formP;
Int16 fieldID;
FieldPtr fieldPointer;
MemHandle MemHandleString;
MemHandleString = DmGet1Resource('tSTR', 1000);
formP=FrmInitForm (1200);
fieldID=FrmGetObjectIndex (formP, HelpTextBodyField);
fieldPointer = (FieldPtr) FrmGetObjectPtr(formP, fieldID);
FldSetTextHandle (fieldPointer, MemHandleString);
DmReleaseResource(MemHandleString);
FrmDoDialog (formP);
}
----------------------------------------------------------------------------
Question 2:
This next issue only occurs on Palm OS 3.1 and before. When I draw bitmaps
on the screen, I use the code below. It seems the OS handles things well,
even negative xy execpt with os 3.1 and below. Os 3.3, 3.5 etc have no
problems. Does anyone have a work around? (IE I need this to work on older
systems)
static void DrawBitmap(Int32 x, Int32 y, Int32 id)
{
MemHandle h;
BitmapPtr p;
h = DmGet1Resource('Tbmp', id);
if (h != NULL)
{
p = (BitmapPtr) MemHandleLock(h);
WinDrawBitmap(p, x, y);
MemHandleUnlock(h);
DmReleaseResource(h);
}
}
----------------------------------------------------------------------------
Thanks alot in advance!
-- Wolfgang Bochar
-- Dymaxium Inc.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/