MM_TWIPS behaves differently on XP in Parallels!

Discussion in 'Parallels Desktop for Mac' started by danielearwicker, Nov 25, 2006.

  1. danielearwicker

    danielearwicker Bit poster

    Messages:
    8
    Here's some MFC code:

    // scale the viewport to use twips (1440 units per inch)
    pDC->SetMapMode(MM_TWIPS);
    pDC->SetMapMode(MM_ANISOTROPIC);
    pDC->ScaleViewportExt(1, 1, -1, 1);

    // draw a horizontal line 1 inch long
    pDC->MoveTo(0, 1000);
    pDC->LineTo(1440, 1000);

    This produces very different results inside Parallels from what it does on a non-virtual XP install - the line is about 1/3rd of the usual length.

    And yet GetDeviceCaps(pDC->m_hDC, LOGPIXELSX) returns the same value on my Parallels install of XP and on real XP machines.

    I assume this is some quirk of the display driver? I can provide a test program if anyone is interested in fixing this!
     
  2. danielearwicker

    danielearwicker Bit poster

    Messages:
    8
    This doesn't occur if I uninstall Parallels Tools, so it must be something wrong with the Parallels display driver.
     
  3. Andrew @ Parallels

    Andrew @ Parallels Parallels Team

    Messages:
    1,507
    Thanks for report! We will check this.
     
  4. danielearwicker

    danielearwicker Bit poster

    Messages:
    8
    Were you able to replicate this? And is there anything I can change to work around it? Thanks.
     
  5. Andrew @ Parallels

    Andrew @ Parallels Parallels Team

    Messages:
    1,507

Share This Page