掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
DiglogWindowの最少化位置の指定 (ID:73027)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
ありがとうございました ChildView.cppの中にありました こういうところで 最小化の位置指定が出来ると良いなと思ったのですが これまでの助言からは無理のようです。 void CChildView::OnParameterSet() { // 2009/10/27 t.yoshino モードレス表示 // m_wndParam.SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOSIZE); // 必要なし // m_wndParam.CenterWindow(); // 親ウィンドウに対して中央寄せ 無いと右寄せ // m_wndParam.RightWindow(); // 親ウィンドウに対して右寄せ、//'RightWindow' : 'CParameterDlg' のメンバではありません。 //2009/10/29 以下追加 右寄せ by totoko // http://social.msdn.microsoft.com/Forums/ja-JP/user/threads?user=Shonan%20Hannya // 親ウィンドウの位置を得る CRect rectParent; GetWindowRect(&rectParent); // 子ウィンドウの位置を得る CRect rectChild; m_wndParam.GetWindowRect(&rectChild); // 親の右端から子の幅分オフセットさせた位置に配置 long width = rectChild.right - rectChild.left; rectChild.right = rectParent.right; rectChild.left = rectChild.right - width; // 親ウィンドウの中ほどの高さに配置 by ミッヒー long parentHeight = rectParent.bottom - rectParent.top; long childHeight = rectChild.bottom - rectChild.top; rectChild.top = rectParent.top + parentHeight / 4; rectChild.bottom = rectChild.top + childHeight; // ここまで m_wndParam.MoveWindow(&rectChild); m_wndParam.BringWindowToTop(); // 前に持ってくる m_wndParam.ShowWindow(SW_SHOW); // 表示 } //endof OnParameterSet(
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.