views:

224

answers:

1

So, I'm busy making a model viewer, I'm trying to get my dialog properly setup, and get my openGL view ports squared ( I'm using picture box controls for it ), one big problem. Visual studio doesn't allow me to set the the size manually, I can't see the actual pixel size. I can only see it in the bottom right corner of the screen but that's in dialog units not in pixel units and somehow that screw up terribly..

Look here for example, that selected thing should be a square according to visual studio, you can see in the bottom right corner it says "170 x 170" but you can clearly see it's nowhere near square, I can even test it by running my application, the openGL render gets squashed up and doesn't look right cause of the thing not being squared:

Screenshot: http://i42.tinypic.com/xpsepf.jpg

Because I can't set it by hand I can't get it right.. I've also tried opening/editing the .rc in other resource editors but visual studio saves it with it's own type of compression which makes any other tool unable to open the file, I've tried ResourceHacker, ResourceTuner, Restorator, XYExplorer and even the WinASM resource editor which I used for my previous model viewer, all are unable to open the file.

Does anybody have an idea or know about an option in visual studio so I can see it's width and height..? I can if I make a dialog in WinASM studio for example.. VisualStudio should support this.

A: 

The resource editor works in DLU ( Dialog Logical Unit), not in pixels.

see this other question (and links included) : http://stackoverflow.com/questions/1453046/mfc-dialog-size-question

Max.

Max
Yes I know that it is entered in DLU's but the problem is I can not set them manually like width and height which is a problem. Also why would 170x170 dialog units not be squared? It should not mater what units it's in, as long as the units on x and y are the same it should be squared am I correct?
Yonathan Klijnsma
I would suspect from context that a DLU isn't necessarily a square - so 170 pixels height != 170 pixels width.
Dan Puzey
Than does anybody know what exactly is the relation for a square in DLU units? Still think 1 dlu horizontal being different from 1 dlu vertical is a bit odd.. you can never rely on calculations with that apparently.
Yonathan Klijnsma