void SetClientRect(HWND hWnd, int nWidth, int nHeight)
{
  RECT rtClient;
  DWORD Style, ExStyle;
 
  SetRect( &rtClient, 0, 0, nWidth, nHeight );
  Style = GetWindowLong( hWnd, GWL_STYLE);
  ExStyle = GetWindowLong( hWnd, GWL_EXSTYLE );
 
  AdjustWindowRectEx( &rtClient, Style, GetMenu( hWnd ) != NULL, ExStyle );
  if( Style & WS_VSCROLL ) rtClient.right += GetSystemMetrics( SM_CXVSCROLL );
  if( Style & WS_HSCROLL ) rtClient.bottom += GetSystemMetrics( SM_CYVSCROLL );
  SetWindowPos( hWnd, NULL, 0, 0, rtClient.right - rtClient.left, rtClient.bottom - rtClient.top, SWP_NOMOVE SWP_NOZORDER);
}
 
2006/05/14 00:04 2006/05/14 00:04

글 걸기 주소 : 이 글에는 트랙백을 보낼 수 없습니다

덧글을 달아 주세요