Different Heights for a Window on different machines

Different Heights for a Window on different machines

Post by sCaLLio » Fri, 03 Mar 2000 04:00:00



the dialog width and height in pixels will depend on the dialog font and the
dialog template size.
look at MapDialogRect() to convert between template sizes and pixels.
HTH
sCaLLioN
 
 
 

Different Heights for a Window on different machines

Post by Shubh » Sat, 04 Mar 2000 04:00:00


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.

 
 
 

Different Heights for a Window on different machines

Post by Rene Pilo » Sat, 04 Mar 2000 04:00:00


Control Panel - Display - Settings - Font Size - should be set to Small
Fonts
 
 
 

Different Heights for a Window on different machines

Post by Raffaele Cappell » Sat, 04 Mar 2000 04:00:00


Hi, 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?

4. CompanionLink for ACT

5. Draw line with style different that solid and width different that 0

6. new and delete

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)