Re: Win32 API mapping system
Here are some links to some explanations. I don't know if you use MFC or not but native Win API isn't that different so you will probably be able to get it anyway.
http://flylib.com/books/en/4.348.1.11/1/
http://www.********.net/Free-VC-Draw...C-Tutorial.htm
http://support.microsoft.com/KB/195028
http://forums.codeguru.com/archive/i.../t-285557.html
Edit: Those stars should be u c a n c o d e without the spaces. I don't know why it's replaced like that...:confused:
Re: Win32 API mapping system
Hi,
thanks, I've read few articles, but still I'm confused. Thanks for the links, I'll check it and hopefully it will help. I'm not prgramming in MFC.
Thanks
Re: Win32 API mapping system
I've read all the articles and it was really interesting, thank you for that. I'm still little bit confused of it. Even when I'm using the default mapmode MM_TEXT, there is the viewport and the window with predifined parametrs.
What I don't understand is, how is it possible, that I can draw behind the boundaries of the window and during resizing the window I see them... I thought, that there is limitted size of the area (viewport), where I can draw.
And another thing, using the origins of the window, its easy to scroll, so why is it not used for example for the scrollbars and the scrollbars use the ScrollWindow fce and you have to set all the things around it... this is much simpier...
Re: Win32 API mapping system
I'm sorry but I feel I can't explain it better than those links I gave you.
Whenever you experience that some things in Windows would be easier if done in another way keep in mind that MS is very reluctant to change things since that would break more or less every existing application out there. I.e. some things have a long history dating as far back as to Windows 1.0 http://en.wikipedia.org/wiki/Windows_1.0
You also asked why all these mapping settings exists when the screen is in pixels and that's because most things in real life isn't measured in pixels... ;) These mapping functions make it easier for instance a CAD software to present a proper scaled drawing regardless if on the screen or on a printer. The physical size of a pixel on screen is huge compared to the one on a laser printer so printing using pixels will produce something completely useless.
Keep experimenting and you will probably end up realizing that most functions are not as stupid as you though when using them for the first time. They are there to assist you regardless of what kind of application you write by making drawing details a bit more abstract.
Re: Win32 API mapping system
Hey, you don't have to be sorry. You helped me really much. As you said, I've to experiment with it a little bit more and take it as a fact.
The first thing I thought the mapping mode it is necessary for are CAD SWs. :-) But I was confused, why should I use it in my program, where I want to use just pixels... Now I'm cleverer. Thank you for help.