// 以下两个函数获取的是显示屏幕的大小,不包括任务栏等区域
int screenwidth = GetSystemMetrics(SM_CXFULLSCREEN);
int screenheight = GetSystemMetrics(SM_CYFULLSCREEN);
printf("%d,%d\n", screenwidth, screenheight);

// 以下两个函数获取的是真正屏幕的大小,即实际的大小
int screenwidth_real = GetSystemMetrics(SM_CXSCREEN);
int screenheight_real = GetSystemMetrics(SM_CYSCREEN);
printf("%d,%d\n", screenwidth_real, screenheight_real);
// 获取可用桌面大小
RECT rect;
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
int cx = rect.right - rect.left;
int cy = rect.bottom - rect.top;

printf("%d,%d\n",cx,cy);
printf("%d,%d,%d,%d",rect.left,rect.top,rect.right,rect.bottom);