I'm trying to get a general purpose dialog to pop up showing text. It's
defined below. It will pop the form up, but I can't figure out why the text
I'm inserting isn't showing up. Can someone please look this over and tell
me where I'm going wrong?
Thanks,
Chris Bruner
FORM ID InfoForm AT ( 2 2 156 156 )
MODAL DEFAULTBTNID InfoDoneButton
BEGIN
TITLE "Information"
BUTTON "Done" ID InfoDoneButton AT (66 135 AUTO AUTO)
FIELD ID InfoTextField AT (7 19 144 111) MAXCHARS 255 HASSCROLLBAR
NONEDITABLE MULTIPLELINES UNDERLINED
END
#define InfoTextField 1026
#define InfoDoneButton 1025
#define InfoForm 1024
void DisplayMessage(const char *Info)
{
/* Display the InfoForm. */
FormType * frmP = FrmInitForm (InfoForm);
FieldType *field;
UInt16 fieldIndex;
fieldIndex = FrmGetObjectIndex(frmP, InfoTextField);
field = (FieldType *)FrmGetObjectPtr(frmP, fieldIndex);
FldSetInsertionPoint(field,1);
FldInsert(field, Info, StrLen(Info));
FrmSetFocus(frmP, fieldIndex);
FrmDrawForm(frmP);
FrmDoDialog (frmP);
FrmDeleteForm (frmP);
}
Chris Bruner
Compulife Software Inc.
==============================================
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/