I’m doing some tests in msvc and C++. I’m trying to create dialog with ResEdit (available here http://www.resedit.net/) and when .RC file is created, I’m trying to use same values for CreateWindowEx API to create dialogues by native way (because resources can be edited and I don’t want such thing). But, when I convert .RC values to CreateWindowEx, it becomes too small.. Can anyone suggest me what to do or a simple working code please?
Thank you.
I’m doing some tests in msvc and C++. I’m trying to create dialog with
Share
Dialog units are not the same as pixel sizes. From memory, a dialog unit by default represents 1.5 pixels. So for a quick hack, scale your position and size values by 1.5.
But you should really use the
GetDialogBaseUnitsfunction, because the units are designed to scale with the system font.Reference here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms645475(v=vs.85).aspx