[현재 윈도우 해상도 얻기]
1. GetSystemMetrics()
int nWidth = GetSystemMetrics( SM_CXFULLSCREEN );
int nHeight = GetSystemMetrics( SM_CYFULLSCREEN );
2. GetWindowRect()
CRect rect;
::GetWindowRect( ::GetDesktopWindow(), &rect);
3. EnumDisplaySettings()
DEVMODE mode;
::EnumDisplaySettings( NULL, ENUM_CURRENT_SETTINGS, &mode );
UINT nWidth = mode.dmPelsWidth;
UINT nHeight = mode.dmPelsHeight;
[작업 표시줄을 제외한 윈도우 영역 크기 얻기]
CRect rect;
SystemParametersInfo( SPI_GETWORKAREA, 0, &rect, 0 );
[트레이 영역 크기 얻기]
HWND hTrayP = ::FindWindow( "Shell_TrayWnd", NULL );
HWND hTrayC = ::FindWindowEx( hTrayP, NULL, "TrayNotifyWnd", NULL );
if( hTrayC )
{
::GetWindowRect( hTrayC, &rect );
}
퍼옴 http://purelab.org/zbxe/?mid=guruin&listStyle=list&document_srl=1942





최근 덧글