ホーム » MFC » MFC 起動時のドキュメントの変更

2021年3月
 123456
78910111213
14151617181920
21222324252627
28293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 80,221 アクセス



MFC 起動時のドキュメントの変更

ドキュメントのドロップ時のファイル名の変更 には対応したが,今度は起動時のドキュメントの変更.
InitInstance の所をデバッガで追いかけると,CWinApp::ProcessShellCommand の前後で対応できそう.
CWinApp::ProcessShellCommand
次の様に,対象のファイルを変更して起動できることは確認.

	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);
	{
		if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileOpen) {
			cmdInfo.m_strFileName = ::Path_ChangeExt(cmdInfo.m_strFileName,_T("ig3")).c_str() ;
			}
		}
	if (!ProcessShellCommand(cmdInfo))
	//	...
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

コメントする

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

%d人のブロガーが「いいね」をつけました。