掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
同時起動時ActiveなDialogWindowを非Activeにする (ID:73382)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
環境 WindowsXp、VSC++6.0 現状 使用変数を取り入れるModelessDialogWindowはCKolamDesignerAppプログラムを起動すると 同時に表示され、かつactiveになります。本体(ChildViewで表示している)のWindowはカーソルで一度クリックしてactiveになります。 希望は表示はするが、activeなWindowはDialogではなく、本体のViewにしたい。 どのようなコードがあればよいか助言をおねがいします dialogWindowの表示設定は以下のとおりです void CChildView::OnParameterSet() { // 2009/10/27 t.yoshino モードレス表示 // 親ウィンドウの位置を得る 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( // CKolamDesignerApp initialization BOOL CKolamDesignerApp::InitInstance() { AfxEnableControlContainer(); 略 pFrame->PostMessage(WM_COMMAND, ID_PARAMETER_SET); return TRUE; }
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.