Ok, back again with the same problem...

I have learned how to code all basics windows and dialog boxes, and now I want to write a real application (something, maybe, useful).

I code it on my PC and spend a great effort in projecting the resorces (that are quite big).
When I transfer it on my laptop, all goes wrong !!

Dialog boxes and bitmaps are not in the same place, commands and texts have different sizes and so on.
Now, if one want to code an application, it should be the same on every computer and not depending on a particular PC setting. So how can I retrieve useful user setting and make my app looking the same ? (For example, I have no success using GetDlgBaseUnit and so on...)

By the way, my app is a little PE editor; when I look at the common apps available for download I see that almost all are coded in Delphi or some other HLL... maybe this is the only solution worthing.

I can't believe (really) that this cannot be done in asm...

Please help me (tuts location on the argument will help).

Thanx, Saiwa
Posted on 2001-09-15 06:31:20 by Saiwa
Are you having the problem with controls and bmps you place yourself with code, or with those placed through the resourse.

The whole idea with dialog base units is that allows you to adjust text sizes and other things incase maybe you find find small text difficult to read. The dialog base units ensure that if you pick a lager font that half the text doesn't end up missing underneat another control or something. Everything is moved relatively to fit everything in.

What this means is that if your having the problem with things in the resourse there may be no simple solution. However I've never seen this problem occur unless someone is using a bizzare font.

If the problem occurs with item you place throught code then your best bet is probably to try and place them relativly to something else. Use GetClientRect to get the location of a button or something and place the additional control or bmp relative to this.
Posted on 2001-09-15 07:17:48 by Eóin
Maybe a little explanation is necessary.

I use a main DialogBox and several child Dialog as skeleton for my application (child are called using tab controls).

All the controls are defined in the .rc file since I don't like very much to code them directly in main program.
Maybe the problem is related to the use of a dialog box as main interface, and probably I should use Windows... I have seen a lot of people use to create their controls (buttons, edit boxes and so on) with CreateWindowEx API.

I like Dialog boxes since they are enough for small applications, but I think their problem is they use Dialog Units and not pixels to define their dimensions... probably the conversion between the two units also depends on video settings.

Moreover, I don't use any bizarre font, but the simplest MS Sans Serif (I think is system font).

Probably I need to change totally my programming style...

Bye, Saiwa
Posted on 2001-09-15 13:07:47 by Saiwa
Probably not...

I would think if you have child dialog boxes you should then use a window as the main interface, not another dialog.

Perhaps if you post a screen shot of the problem we'd understand better.
Posted on 2001-09-15 16:58:01 by Eóin
If you don's specify a font to be used with your dialogbox the
system default font will be used.
Maybe this is your problem?

Posted on 2001-09-15 17:05:29 by KetilO