Share via


CTabCtrl::AdjustRect

ウィンドウ四角形を持つタブ コントロールの表示領域を計算するか、特定の表示領域に対応するウィンドウ四角形を計算します。

void AdjustRect(
  BOOL bLarger,
  LPRECT lpRect 
);

パラメーター

  • bLarger
    実行する操作です。このパラメーターがの場合、は **[真]**lpRect 表示する四角形を指定し、対応するウィンドウ四角形が表示されます。このパラメーターがの場合、FALSElpRect は、ウィンドウの四角形を指定し、対応する表示する四角形を受け取ります。

  • lpRect
    指定された四角形を指定し、計算された四角形を受け取る RECT の構造体へのポインター。

使用例

void CTabDlg::OnSize(UINT nType, int cx, int cy)
{
   CDialog::OnSize(nType, cx, cy);

   if(m_TabCtrl.m_hWnd == NULL)
      return;      // Return if window is not created yet.

   RECT rect;

   // Get size of dialog window.
   GetClientRect(&rect);

   // Adjust the rectangle to fit the tab control into the 
   // dialog's client rectangle.
   m_TabCtrl.AdjustRect(FALSE, &rect);

   // Move the tab control to the new position and size.
   m_TabCtrl.MoveWindow(&rect, TRUE);   
}

必要条件

ヘッダー: afxcmn.h

参照

関連項目

CTabCtrl クラス

階層図

CTabCtrl::SetItemSize

CTabCtrl::GetItemRect

CTabCtrl::AdjustRect