I'm writting a program where I need the coordinates of the mouse when it's clicked inside the client area. For some reason, the coordinates seem to be in base 21, maybe higher (I've seen the character k). I'm not sure why this is happening.
Here's the mouse section of the message loop
case WM_LBUTTONDOWN:
{
int x = ((int)(short)LOWORD(lParam));
int y = ((int)(short)HIWORD(lParam));
char buf[20];
string s = itoa(x, buf, 21);
s += ", ";
s += itoa(y, buf, 21);
MessageBox(hwnd, s.c_str(), "Distance", MB_OK | MB_APPLMODAL);
return 0;
}