掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
ShellExecuteで開くマイコンピュータのサイズと位置を指定する (ID:61026)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
ありがとうございます。 最終的に、下記のようにしました。 Blueさんが最初に提示してくださったコードでいきます。 エクスプローラのクラス名はCabinetWClassでした。 char mych1[1000]; const int screenX = ::GetSystemMetrics( SM_CXSCREEN ); const int screenY = ::GetSystemMetrics( SM_CYSCREEN ); strcpy(mych1,fullpath); strcat(mych1,"\\Folder1"); ShellExecute( HWND_DESKTOP, "open", "explorer.exe", mych1, NULL, SW_SHOW ); strcpy(mych1,fullpath); strcat(mych1,"\\Folder2"); ShellExecute( HWND_DESKTOP, "open", "explorer.exe", mych1, NULL, SW_SHOW ); CWnd* pWnd1 = this->FindWindow("CabinetWClass","Folder1"); CWnd* pWnd2 = this->FindWindow("CabinetWClass","Folder2"); if (( pWnd1 )&&( pWnd2 )) { pWnd1->MoveWindow( 0, 0, screenX / 2, screenY, TRUE ); pWnd1->ShowWindow( SW_SHOW ); pWnd1->SetForegroundWindow(); pWnd2->MoveWindow( screenX / 2, 0, screenX / 2, screenY, TRUE ); pWnd2->ShowWindow( SW_SHOW ); pWnd2->SetForegroundWindow(); }
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.