Converting printf statement

Hello all!

How do I convert the following printf sentence so that it can be displayed in a text string widget? I know I should use PtSetResource but I’m not sure of the parameters to be filled in.

if(GetField(pData,pField,0,mAXFIELD))
{
pBuff[0]=pField[0];
pBuff[1]=pField[1];
pBuff[2]=pField[2];
pBuff[3]=pField[3];
pBuff[4]=pField[4];
pBuff[5]="\0";
heading_value=atof(pBuff);

printf(“Heading: %5.1fNE”,heading_value);
}
where NE stands for north east.

PtSetResources(ABW_base_text1,???,???,0);

Can anyone please help me. Thanks in advance.

I think the first example here is what you are after.

qnx.com/developers/docs/mome … ttext.html

Cheers