Created
March 24, 2016 08:23
-
-
Save sergey-shambir/62b37c18fe3d60a08494 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// pixels to dialog units | |
{ | |
WTL::CDialogBaseUnits units(GetFont(), m_hWnd); | |
WTL::CSize size = units.MapDialogPixels(WTL::CSize(800, 520)); | |
wchar_t buffer[2000]; | |
wsprintf(buffer, L"%dx%d", size.cx, size.cy); | |
MessageBoxW(buffer, L"SIZE", MB_OK); | |
} | |
// map dialog units to pixels | |
{ | |
WTL::CDialogBaseUnits units(GetFont(), m_hWnd); | |
WTL::CSize size = units.MapDialogUnits(WTL::CSize(800, 520)); | |
wchar_t buffer[2000]; | |
wsprintf(buffer, L"%dx%d", size.cx, size.cy); | |
MessageBoxW(buffer, L"SIZE", MB_OK); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment