0

What is scale mode in VB wether we can do same logic in mfc . as scale mode is having different modes which are inches etc. how do do in mfc. what scale height ? and let me know how we can do it in mfc.

This code is in vb :
    dScale = m_dScale 'sliScale.Value / 2 
     liSTppX = Screen.TwipsPerPixelX 
      liSTppY = Screen.TwipsPerPixelY 

This code is in vb :           
      picPreview.ScaleMode = vbInches //scale mode
      picPreview.ScaleHeight = picPreview.ScaleHeight * ldScale
      picPreview.ScaleWidth = picPreview.ScaleWidth * ldScale 

how to do in mfc..      

1 Answers1

0

If you are talking about dialogs and controls, the answer is simply no. VB creates its forms programmatically, while MFC uses dialog resources, and the coordinates and sizes are in "dialog units". Unfortunately it is affected by the font scale on each computer, which means that a dialog won't always be sized the same on every computer, even if all use the same resolution, eg 1920x1080. Refer to the Microsoft documentation for more details.

Constantine Georgiou
  • 2,412
  • 1
  • 13
  • 17