Hy everyone,
I'm having trouble with the code below.
I can't get a valid form pointer... the goal is to get a form using it's
resource ID, then the button C1B and change the button text.
Hope someone can help me!
Thanks in advance.
João
------------//-----------------//-------------
static Boolean FrmSeleccaoCamaInit(void){
char word [10]="text";
MemHandle hform= DmGetResource(formRscType,BemVindoForm); //BemVindoForm
is the formID defined in pilrc designer
FormPtr form=(FormPtr) MemHandleLock(hform);
if(!FrmValidatePtr(form)) //PROBLEM HERE :(
DEBUG("no form");
CtlSetLabel((ControlType*)FrmGetObjectPtr(form,
FrmGetObjectIndex(form,C1B)),word);
MemHandleUnlock(hform);
DmReleaseResource(hform);
return true;
}
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/