制作:KrK (Knuth for Kludge)
#include <windows.h>    // Win32API
//-------------------------------------------------
// クライアント矩形をスクリーン矩形に
// 作成 20180211 KrK
// 引数 hWnd:ウィンドウハンドル
// 引数(I/O) pRec:矩形
//-------------------------------------------------
VOID RectToScreen(HWND hWnd, RECT *pRec)
{
  POINT pt_lt;      // 左上(left/top)
  POINT pt_rb;      // 右下(right/bottom)
  // 位置に代入
  pt_lt.x = pRec->left;
  pt_lt.y = pRec->top;
  pt_rb.x = pRec->right;
  pt_rb.y = pRec->bottom;
  // スクリーン領域に
  ClientToScreen(hWnd, &pt_lt);
  ClientToScreen(hWnd, &pt_rb);
  // 矩形に書き戻す
  pRec->left = pt_lt.x;
  pRec->top = pt_lt.y;
  pRec->right = pt_rb.x;
  pRec->bottom = pt_rb.y;
}
RECT rec;   // コントロール領域
// クライアント矩形取得
GetClientRect(hWnd, &rec);
(中略)
// スクリーン矩形に変換
RectToScreen(hWnd, &rec);