Hi
I am trying to divide a number that as user entered in the edit box with a handle (hWndTXTFrom), and display the result on a static control with a handle (hWndTXTTo). If I implement the code as shown below, I don't have the correct result.
Can you Help me to solve this problem, in any way you recommend.

Also many of the data conversion such as _gcvt, itoa and so on are not recognized when I am trying to compile my program under win32 x86 MIP or wince MIP!!!

I am using visual c++ 5 ce sdk and ce tool kit on windows nt server.
Implementation are done thought win32 api calls, (NO MFC programming)

Thank you
Maher Suboh
[email protected]

/////////////////////////////////////////////////////////////////////////////////////////////////
TCHAR szBuffer[20];
GetWindowText(hWndTXTFrom, szBuffer, sizeof(szBuffer));
double x;
x = 3.8765 / wcstod(szBuffer, 0)

_gcvt( x, 7, (LTCSTR)szBuffer );

/* _gcvt( x, 7, (LTCSTR)szBuffer );
IF I HAVE IT WITHOUT (LTCSTR) IT WON'T COMPILE.
KEEPING IT THIS WAY, IT COMPILE WITHOUT ERRORS.
BUT THE RESULT FOR X ALWAYS IS WRONG. */

wsprintf(szBuffer, "%-06.4s", szBuffer );
SendMessage(hWndTXTTo, WM_SETTEXT, sizeof(szBuffer), (LPARAM)szBuffer);
//////////////////////////////////////////////////////////////////////////////////////////////////