Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sets width and height of dialog
#4
you're not accounting for the non-client area of the window.
there is a built in windows function to convert dialog units to pixels

use this
Code:
Copy      Help
,case 401
,RECT r r1 r2;
,r.left = 0; r.top = 0; r.right = 216; r.bottom = 144;
,MapDialogRect(hDlg &r)
,DpiGetWindowRect hDlg r1 4; DpiGetWindowRect hDlg r2 
,int ncah=(r2.bottom-r2.top) - (r1.bottom-r1.top)
,int ncaw=(r2.right-r2.left) - (r1.right-r1.left)
,siz r.right+ncaw r.bottom+ncah hDlg


Messages In This Thread
Sets width and height of dialog - by Davider - 12-26-2022, 04:15 AM
RE: Sets width and height of dialog - by Davider - 12-26-2022, 10:32 PM
RE: Sets width and height of dialog - by Davider - 12-26-2022, 11:47 PM
RE: Sets width and height of dialog - by Kevin - 12-27-2022, 03:46 PM
RE: Sets width and height of dialog - by Davider - 12-27-2022, 10:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)