Use of SetMapMode... - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Use of SetMapMode...

SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
I've been looking into a way to change the coordinates of a window to 50x50 (possibly change the window resolution to 50x50?), and have run across SetMapMode, SetWindowExtEx, and SetViewportExtEx. I am not sure exactly what these do, and I have tried using them to create a 50x50 coordinate system, but I may nt be doing it right. I'll post what I have below.

sizedc = GetDC(GetDlgItem(szwnd, ID_DATAVIEW));

SetMapMode(sizedc, MM_ANISOTROPIC);

SetWindowExtEx(sizedc, 50, 50, NULL);

SetViewportExtEx(sizedc, GetDeviceCaps(sizedc, LOGPIXELSX), GetDeviceCaps(sizedc, LOGPIXELSY), NULL);

ReleaseDC(GetDlgItem(szwnd, ID_DATAVIEW), sizedc);

The information in my help file uses 64x64 to simulate 1/64in in a CAD program. Maybe this is something that I don't need to use, but if anybody could help me figure out how to set up a window so that it only has 50 coordinates on both the X and Y axis, I'd appreciate it.


Sign In or Register to comment.