我想问你一个问题,是关于"为什么我用MM_ISOTROPIC画出的圆不圆",分辨率设置都正常.程序如下:<br/><br/>#include <windows.h><br/>LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;<br/>int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,<br/> PSTR szCmdLine, int iCmdShow)<br/>{<br/> static TCHAR szAppName[] = TEXT ("LineDemo") ;<br/> HWND hwnd ;<br/> MSG msg ;<br/> WNDCLASS wndclass ;<br/> <br/> wndclass.style = CS_HREDRAW | CS_VREDRAW ;<br/> wndclass.lpfnWndProc= WndProc ;<br/> wndclass.cbClsExtra = 0 ;<br/> wndclass.cbWndExtra = 0 ;<br/> wndclass.hInstance = hInstance ;<br/> wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;<br/> wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;<br/> wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;<br/> wndclass.lpszMenuName = NULL ;<br/> wndclass.lpszClassName = szAppName ;<br/> <br/> if (!RegisterClass (&wndclass))<br/> {<br/> MessageBox (NULL, TEXT ("Program requires Windows NT!"), <br/> szAppName, MB_ICONERROR) ;<br/> return 0 ;<br/> }<br/> <br/> hwnd = CreateWindow ( szAppName, TEXT ("Line Demonstration"),<br/> WS_OVERLAPPEDWINDOW,<br/> CW_USEDEFAULT, CW_USEDEFAULT,<br/> CW_USEDEFAULT, CW_USEDEFAULT,<br/> NULL, NULL, hInstance, NULL) ;<br/> <br/> ShowWindow (hwnd, iCmdShow) ;<br/> UpdateWindow (hwnd) ;<br/> <br/> while (GetMessage (&msg, NULL, 0, 0))<br/> {<br/> TranslateMessage (&msg) ;<br/> DispatchMessage (&msg) ;<br/> }<br/> return msg.wParam ;<br/>}<br/><br/>LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)<br/>{<br/> HDC hdc ;<br/> PAINTSTRUCT ps ;<br/> TCHAR szbuffer[90];<br/> SIZE size,size1;<br/> switch (message)<br/> {<br/> <br/> case WM_PAINT:<br/> hdc = BeginPaint (hwnd, &ps) ;<br/> SetMapMode (hdc, MM_ISOTROPIC) ;//这里出了问题<br/>SetWindowExtEx (hdc, 50, 100, NULL) ;<br/>SetViewportExtEx (hdc, 5,5, NULL) ;<br/>GetWindowExtEx(hdc,&size);<br/>GetViewportExtEx(hdc,&size1);<br/>TextOut(hdc,0,0,szbuffer,wsprintf(szbuffer,TEXT("%d %d %d %d"),size.cx,size.cy,size1.cx,size1.cy));<br/>Ellipse (hdc, 1000, 1000, 5000, 5000) ;<br/> <br/> EndPaint (hwnd, &ps) ;<br/> return 0 ;<br/> <br/> case WM_DESTROY:<br/> PostQuitMessage (0) ;<br/> return 0 ;<br/> }<br/> return DefWindowProc (hwnd, message, wParam, lParam) ;<br/>}