12-27-2022, 03:46 PM
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
there is a built in windows function to convert dialog units to pixels
use this
,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