CTabCtrl::AdjustRect

更新 : 2007 年 11 月

指定したウィンドウ四角形でタブ コントロールの表示領域を計算します。または、指定した表示領域に相当するウィンドウ四角形を計算します。

void AdjustRect(
  BOOL bLarger,
  LPRECT lpRect 
);

パラメータ

  • bLarger
    どの操作を実行するかを指示します。パラメータが TRUE の場合、lpRect は表示四角形を示し、対応するウィンドウ四角形を受け取ります。パラメータが FALSE の場合、lpRect はウィンドウ四角形を示し、対応する表示四角形を受け取ります。

  • 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

その他の技術情報

CTabCtrl のメンバ