How compute windows size with and without border?

I am working under Windows 8.1; I test window size with border and without border. Horizontal difference is 16, vertical 39. 39 = cyCaption+16;
Frame has 8 on all sides? Why cySizeFrame = 4 and cyBorder is only 1 ?
1
2
3
4
5
6
7
8
9
10
  SetWindowPos(hWnd,  HWND_TOP,  100,  100,  300,  70,  SWP_SHOWWINDOW);
   RECT rcClient, rcWind;
   GetClientRect(hWnd, &rcClient);
   GetWindowRect(hWnd, &rcWind);
   int xdiff =  (rcWind.right-rcWind.left)-(rcClient.right-rcClient.left);//16
   int ydiff =  (rcWind.bottom-rcWind.top)-(rcClient.bottom-rcClient.top);//39
   int cxSizeFrame = GetSystemMetrics(SM_CXSIZEFRAME);
   int cySizeFrame = GetSystemMetrics(SM_CXSIZEFRAME);
   int cyCaption = GetSystemMetrics(SM_CYCAPTION);
   int cyBorder = GetSystemMetrics(SM_CYBORDER);.

Topic archived. No new replies allowed.