Prev: "PORTING C" > Viewing an array in wathc window fails!
Next: Abou tstd::random_shuffle's RandomNumberGenerator
From: Jack on 18 Jan 2010 04:22 Hi, case WM_PAINT: hDC = BeginPaint(hWnd, &PaintStruct); SetMapMode(hDC, MM_ISOTROPIC); SetWindowExtEx(hDC, 450,450,NULL); SetViewportExtEx(hDC, cxClient, -cyClient, NULL); SetViewportOrgEx(hDC, 0, cyClient, NULL); //[snip] ... case WM_MOUSEMOVE: int xPos, yPos; xPos = LOWORD(lParam); yPos = HIWORD(lParam); char buff[80]; sprintf (buff, "%d", xPos); SetWindowText(editField, buff); sprintf (buff, "%d", yPos); SetWindowText(editField2, buff); break; //.. I am wondering how I can make SetWindowText report the correct coordinates as I am using the mapping mode which starts from the lower-left corner. Currently, +ve x goes to the right and +ve y goes downwards. I'd like to have +ve goes upwards and starts from the lower-left corner. Thanks Jack |