I'm looking for a Win32 API solution, not MFC.
First, I'm looking for a Win32 API Solution. My application dose not support MFC and I want to keep it that way.
Second, what about other combinations like MM_TWIPS to MM_HIMETRIC?
I can convert logical coordinates to device coordinates, but how does that help me convert a size mesured in MM_HMETRIC to MM_TEXT?
Re: I'm looking for a Win32 API solution, not MFC.
Hi,
I ran into the same problem from time to time. I usually do it this way: I get a DC based on the desktop, set it to the desired mapping mode, convert the coordinates with DPtoLP or LPtoDP, and then free the DC. This doesn't prevent you from the rounding errors, but it works.
In addition, somewhere deep in the documentation the conversion algorithm is described. But I found my solution easier to program ;-)
Martin