Proper Measurements?

I'm designing a GUI with ResEdit then porting the coordinates and sizes of the controls I've implemented into the GUI. However there is one little problem: the units seem to be showing wrong on ResEdit. Since I'm using the CreateWindowEx() function, I need "measurements in device units". What the hell does that mean?!

The dimensions for the window and controls show up different in ResEdit's code preview. Why is it that ResEdit shows different dimensions in the code preview than inside ResEdit's window? Is there some way to make ResEdit display the proper C++ coordinates and measurements right in its window (with my GUI design in it)?
As far as I know, it is something like ResEdit uses dialog units for measuring the locations of controls, as that is what is used in resource files (.rc). CreateWindowEx() creates the control based in device units, which I assume are something like pixels on screen.

As far as I know, ResEdit won't change the units it is showing. However, if you go Code Preview -> View C/C++ Source then it will give you the actual CreateWindowEx() that is uses.

Why don't you just use a resource file instead, anyway? It would be a bit easier....
Last edited on
Ah, I see. So what about getting the x and y of the controls right? Apparently ResEdit doesn't utilize parent windows, so that makes me even more confused. Is there some kind of formula that I can use to position the controls on the window in the code just like it shows in ResEdit? If not, is there another GUI creator that uses parent windows?
You can export a version of your code as a C/C++ code, rather than a resource file. This means that you just copy from that code into your main program, and from there do your renaming handles and whatever you want to do.
Topic archived. No new replies allowed.