HI,

I'm new for Palm programming and i'm trying to build my first simple app, i 
need to print out the money value with WinDrawChars, now i cant get the 
right string out, i have tried %i , %d , %f and others but nothing works, i 
always get the wrong value, so what's wrong in this code?

char chMsg[50];
float Value, UserVal, Rate;

if (eventP->data.ctlSelect.controlID == MainBtnCalculateButton)
{                       
        UserVal = 1000;
        Rate = 0.595;
        Value = UserVal * Rate;      //Value is OK in this point
        StrPrintF(chMsg, "Sum is: %i", Value);
        oldFont = FntSetFont(largeFont);
        oldUndeline = WinSetUnderlineMode(grayUnderline);                       
        WinDrawChars(chMsg, StrLen(chMsg), 6, 96);
                        
        FntSetFont(oldFont);
        WinSetUnderlineMode(oldUndeline);
        handled = true;
}

I'm using CW 7.0 in Windows 2000 Pro SP1

Jari Kaipio
Finland         

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to