Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3670
Number of posts: 9122

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Use of SetMapMode... Posted by Sephiroth on 13 Apr 2001 at 7:34 AM
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.

<br>-Sephiroth




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.