IrfanViewで、画像ファイルのフォルダを選択した状態でエクスプローラを開く
どういうわけか"/"が入るとIrfanViewで起動できない?ようなので、
実行ファイルを作りました。ただ、それだけ。
//explorer-select-dir.cpp
#include <string>
#include <windows.h>
#include <tchar.h>
#include <cstdlib>
int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
){
if(__argc == 1){
return 1;
}
std::basic_string<TCHAR> cmd = "/n, /select,";
cmd += __targv[1];
cmd += "\\..\\";
ShellExecute(
0,
0,
"explorer",
cmd.c_str(),
0,
SW_SHOW
);
}
g++ explorer-select-dir.cpp -mwindows -oexplorer-select-dir.exe