Windows Mobile下C++取屏幕分辨率的方法

方法一

RECT rc;
::GetWindowRect(GetDesktopWindow(), &rc);

这个取出来是动态的,例如rotate the sreen,值会变化。

方法二

const long nScreenWidth = ::GetSystemMetrics(SM_CXSCREEN);
const long nScreenHeight = ::GetSystemMetrics(SM_CYSCREEN);

这是静态的。

你可能感兴趣的:(Windows Mobile)