problem.I have created a dialog in the resource.But
GetWindowPlacement(..) seems to return 2
different heights on 2 different machines.
This is a piece of code
.....
.....
...
RECT rect;
CDialog dialog;
dialog.Create(IDD_MY_DIALOG,this);
dialog.GetWindowRect(&rect);
height = rect.bottom-rect.top;
.......
...
.....
On most of the machines it returns the same height but the machine
having WINDOWS 98 second edition is an exception.
I am largely dependent on this height to remain the same on all sorts
of machine. height
seems to differ on some of the machines . How can I handle this
situation. Any help will be appreciated.
TIA
Rohith.
Check the API GetSystemMetrics(),
in particular, GetSystemMetrics(SM_CYCAPTION), returns
the height of the window caption, which can be changed in
Display Properties->Appearence, so it can be vary in different machines.
Also SM_CYSIZEFRAME or something similar should be considered.
Hope this helps.
Raffaele
Quote:> Hi,
> I am working on a GUI based product using VC++ 6.0 WINDOWS 95/98 and
> I have this strange
> problem.I have created a dialog in the resource.But
> GetWindowPlacement(..) seems to return 2
> different heights on 2 different machines.
> This is a piece of code
> .....
> .....
> ...
> RECT rect;
> CDialog dialog;
> dialog.Create(IDD_MY_DIALOG,this);
> dialog.GetWindowRect(&rect);
> height = rect.bottom-rect.top;
> .......
> ...
> .....
> On most of the machines it returns the same height but the machine
> having WINDOWS 98 second edition is an exception.
> I am largely dependent on this height to remain the same on all sorts
> of machine. height
> seems to differ on some of the machines . How can I handle this
> situation. Any help will be appreciated.
> TIA
> Rohith.
1. Same program, different machine, different results?
Also, this note from MSDN documentation may
be relevant:
"The Microsoft run-time library sets the default internal
precision of the math coprocessor (or emulator) to 64 bits.
This default applies only to the internal precision at which
all intermediate calculations are performed; it does not
apply to the size of arguments, return values, or variables.
You can override this default and set the chip (or emulator)
back to 80-bit precision by linking your program with
LIB/FP10.OBJ."
The two cases may be working with different internal
precision.
2. How to change (char*) to (WCHAR)
3. Can I programmatically print different pages of a doc with different settings?
5. Draw line with style different that solid and width different that 0
7. Outlook shows different behaviour on different OS?
8. Are there side effects to decimation?
9. Different disconnect error in different threads, plus short TCP timeouts
10. MIDL: different generations in different directories
11. Different calling card causes different response from LineTranslateAddress-is that a bug?
12. Different icons for different program versions?
13. Draw line with style different that solid and width different that 0 (Second request)