The relation between Font Size & Dialog Units

This is a discussion on The relation between Font Size & Dialog Units within the Windows Programming forums, part of the Platform Specific Boards category; I have an app with about 200 controls created with CreateWindowEx at wm_create. I´m now converting this controls to 3 ...

The relation between Font Size & Dialog Units

I have an app with about 200 controls created with CreateWindowEx at wm_create. I´m now converting this controls to 3 dialogs at a resource file... Each dialog will show as a page called by a TabControl.

Once I was finished doing that I found out that I had ruined the App UI. The size of the controls got completely different making the appearance horrible, lots of overlapped controls, some controls even got out of the app workspace, etc.

I could not understand why that happened until I found out somewhere on the web that the dimensions in resource files are not pixels but "Dialog Units" based on the Font you select for that dialog in the resource file.

I´m sure you all probably knew that, I didn´t lol. Well now the %$#!@# is done.
What I am wondering here is that if there´s no way to avoid that relation between Font Size and Dialog Units? It would be great to have the possibility of using exact px dimensions on dialogs like we use with CreateWindowEx...

Maybe there´s some way that I am not aware off?

Sure we could always code something to resize the dimensions of the parent window in order to fit the dialog needs (because it will vary depending if the user has large fonts or small fonts enables on his PC) but that can get too complicated when we are talking about a main window with lots of controls plus the dialogs, it would be necessary to not only resize the main window but also reposition some of the other main window controls, maybe do that at every Tab switch, etc.

I´m just a lame beginner in what concerns the WinAPI, maybe there´s some way to use exact px dimension into the resource file that I´m not aware of?