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!

Categories

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.


-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]

Sign In or Register to comment.