函数简介:

获取窗口客户区域的宽度和高度

函数原型:

long GetClientSize(hwnd,width,height)

参数定义:

hwnd
整形数: 指定的窗口句柄

width
变参指针: 宽度

height 变参指针: 高度

返回值:

整形数:
0:
失败
1:
成功

示例:

 

CString  hw;
 if (g_lw)
 {

    int w = 0, h = 0;
  int ret = g_lw->GetClientSize(724228,&w,&h);
  if (ret)
  {
   hw.Format("窗口宽=%d 窗口高=%d", w,h);
   SetDlgItemText(EDIT1, hw);
  }

  

 }