Index: trunk/ab5.0/abdev/abdev/include/MainFrame.h
===================================================================
--- trunk/ab5.0/abdev/abdev/include/MainFrame.h	(revision 719)
+++ trunk/ab5.0/abdev/abdev/include/MainFrame.h	(revision 749)
@@ -31,5 +31,5 @@
 
 	// Explorerでパスを開く
-	void OpenExplorer( const std::string &path );
+	void OpenExplorer( const std::string &filepath );
 
 	// 生成された
Index: trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 719)
+++ trunk/ab5.0/abdev/abdev/src/MainFrame.cpp	(revision 749)
@@ -7,4 +7,25 @@
 void SetupWindow(HWND hwnd);
 void ResetTextEditFont(HWND hwnd);
+
+void CreateProcessWithStdHandle( const std::string &appPath, const std::string &cmdLine, bool isShowWindow = true )
+{
+	std::string argsStr = "\"" + appPath + "\" " + cmdLine;
+	STARTUPINFO si;
+	PROCESS_INFORMATION pi;
+	memset(&si,0,sizeof(STARTUPINFO));
+	si.cb=sizeof(STARTUPINFO);
+	si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
+	si.wShowWindow = isShowWindow ? SW_SHOW : SW_HIDE;
+	si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+	si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
+	si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
+	
+	char args[8192];
+	lstrcpy( args, argsStr.c_str() );
+
+	CreateProcess( NULL, args, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi );
+	CloseHandle( pi.hProcess );
+	CloseHandle( pi.hThread );
+}
 
 void MainFrame::Resized()
@@ -166,7 +187,7 @@
 }
 
-void MainFrame::OpenExplorer( const std::string &path )
-{
-	ShellExecute(m_hWnd,"explore",path.c_str(),NULL,NULL,SW_SHOWNORMAL);
+void MainFrame::OpenExplorer( const std::string &filepath )
+{
+	CreateProcessWithStdHandle( "explorer", "/select,\"" + filepath + "\"" );
 }
 
@@ -1098,25 +1119,4 @@
 }
 
-void CreateProcessWithStdHandle( const std::string &appPath, const std::string &cmdLine)
-{
-	std::string argsStr = "\"" + appPath + "\" " + cmdLine;
-	STARTUPINFO si;
-	PROCESS_INFORMATION pi;
-	memset(&si,0,sizeof(STARTUPINFO));
-	si.cb=sizeof(STARTUPINFO);
-	si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
-	si.wShowWindow = SW_HIDE;
-	si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
-	si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
-	si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
-	
-	char args[8192];
-	lstrcpy( args, argsStr.c_str() );
-
-	CreateProcess( NULL, args, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi );
-	CloseHandle( pi.hProcess );
-	CloseHandle( pi.hThread );
-}
-
 #ifndef THETEXT
 void MainFrame::OnCmdDebug( UINT uNotifyCode, int nID, CWindow wndCtl )
@@ -1213,5 +1213,5 @@
 
 	extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
-	CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );
+	CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary, false );
 }
 
@@ -1281,6 +1281,5 @@
 
 	extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
-	CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );
-
+	CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary, false );
 }
 
@@ -1333,5 +1332,5 @@
 
 	extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
-	CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( platform ), temporary );
+	CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( platform ), temporary, false );
 }
 
@@ -1401,5 +1400,5 @@
 
 	extern ActiveBasic::Common::Platform::EnumType selectingPlatform;
-	CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary );
+	CreateProcessWithStdHandle( ActiveBasic::Common::Environment::GetCompilerExePath( selectingPlatform ), temporary, false );
 }
 
@@ -1642,9 +1641,5 @@
 	int WndNum=GetWndNum(hChild);
 
-	char temporary[1024], temp2[1024];
-	_splitpath(MdiInfo[WndNum]->path.c_str(),temporary,temp2,NULL,NULL);
-	lstrcat(temporary,temp2);
-
-	OpenExplorer( temporary );
+	OpenExplorer( MdiInfo[WndNum]->path );
 }
 
