// パラメータ // [in]pItem ダイアログアイテムのウィンドウクラス // [in]nX 移動後のX座標 // [in]nY 移動後のY座標 void MoveDlgItem(CWnd *pItem, int nX, int nY) { RECT Rect; // 矩形情報 // 現在の矩形情報を取得する。 pItem->GetWindowRect(&Rect); // ダイアログアイテムを移動する。 pItem->MoveWindow( nX, nY, Rect.right - Rect.left, Rect.bottom - Rect.top); }