Click to See Complete Forum and Search --> : urgent help!!
oren y
May 11th, 1999, 03:02 AM
hi,
i have a dialog with many controls - some of which were placed by the resource editor and the others - through code using - SetWindowPos();
the amazing thing is while in some computers it looks just fine, on others - it is a mess.
any clue?
oren.
(i'm using vc5).
Jaeyeon Lee
May 11th, 1999, 03:23 AM
I think it is the problem of dialog base unit.
Dialog uses different unit (not pixel) for the layout of its controls so as that the dialog looks good
even the resolution of the screen is changed (actually, in many cases, it only makes the problem more complex).
Please check GetDialogBaseUnits for more information.
oren y
May 11th, 1999, 07:53 AM
hi and thanks,
i tried your suggestion and it did something - it moved the controls to another messy position. maybe it is a part of the solution.
any other idea?
oren.
Jaeyeon Lee
May 11th, 1999, 08:06 PM
I'm not sure how you did actually.
But you must be aware that the size of the controls should be altered also.
Hence if you have some controls such as displaying a bitmap of fixed size (in pixel units),
they can cause a trouble.
Another Idea:
Ignore dialog unit altogether.
In this case, you change the size of dialog box itself to your preference.
And move all of your controls to a specific positions you designated.
This may work in most cases.
Good Luck !
oren y
May 12th, 1999, 12:26 AM
Got it!
It was the differenece between large and small fonts in the 'settings' tab of the 'display properties' of windows. but if so - why the convertion to dialog base units didn't help?
anyway i made my own convertion by deviding the x,y dialog's client area dimenssions to the known dimenssions (when the controls are in the right position) and it seems to work just fine.
thanks for the ideas,
oren.
Jason Teagle
May 12th, 1999, 02:19 AM
The dialogue base units control the POSITION of controls relative to the top-left - but they do not control the SIZE of the controls. The framework also changes the size of controls if the font size or screen resolution changes.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.