获取客户区大小 - GetClientSize
函数简介
获取窗口客户区域的宽度和高度
接口名称
GetClientSize
DLL调用
int GetClientSize(long ola, long hwnd, int* width, int* height)
参数定义:
ola
(长整型数): OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。hwnd
(长整型数): 指定的窗口句柄。width
(整型数指针): 用于返回客户区域宽度。height
(整型数指针): 用于返回客户区域高度。
示例:
int width = 0, height = 0;
int ret = GetClientSize(ola, hwnd, &width, &height);
if (ret == 1) {
printf("Client area size: width=%d, height=%d\n", width, height);
} else {
printf("Failed to get client size\n");
}
返回值
整型数:
- 0: 获取失败
- 1: 获取成功