OnLButtonDown 传入的point坐标为客户区坐标,而输出矩形为窗体坐标,
point纵坐标需要加上(标题栏高度:26 和对话框高度:3)
point横坐标需要加上(对话框宽度:3)
int captionHeight=GetSystemMetrics(SM_CYCAPTION);//标题栏高度
int dlgWidth=GetSystemMetrics(SM_CXDLGFRAME );//SM_CXFIXEDFRAME相同
int dlgHeight=GetSystemMetrics(SM_CYDLGFRAME ); //SM_CXFIXEDFRAME相同
int x =point.x + (dlgWidth); //point横坐标
int y = point.y + (captionHeight + dlgHeight ); //point纵坐标
备注:**************************************
int GetSystemMetrics( int nIndex );
The GetSystemMetrics function retrieves various system metrics (widths and heights of display elements)
and system configuration settings. All dimensions retrieved by GetSystemMetrics are in pixels.
*************************************************
int menuHeight=GetSystemMetrics(SM_CYMENU);//菜单栏高度