windows下获取屏幕分辨率:

1
2
int nWidth = GetSystemMetrics(SM_CXSCREEN); //屏幕宽度   
int nHeight = GetSystemMetrics(SM_CYSCREEN); //屏幕高度