CodePudding user response:
1 get corresponding pixel 100 mm//into pixels: * 144/2540
//# define HIMETRIC_PER_INCH 2540
//afxDump & lt;
//int nPicHeight=MulDiv (hmHeight, GetDeviceCaps (pDC - & gt; M_hDC, LOGPIXELSY), 2540);//HIMETRIC_PER_INCH);
//afxDump & lt;
The AdjustWindowRect function calculates The required size of The window is a rectangle, on The desired client - a rectangle size. The window rectangle can then be passed to The CreateWindow function to create a window whose client area is The desired size.
BOOL AdjustWindowRect (
LPRECT LPRECT,//a pointer to the client - a rectangle structure
DWORD dwStyle,//the window styles
BOOL bMenu//menu - the present flag
);