Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Change show in folder code #572

Open
Demez opened this issue Oct 31, 2024 · 0 comments
Open

Windows: Change show in folder code #572

Demez opened this issue Oct 31, 2024 · 0 comments

Comments

@Demez
Copy link

Demez commented Oct 31, 2024

Currently qimgv launches a new explorer process with "/select file", while this does work, it ends up opening a new window every time, even if a window with the file in the folder is open. This win32 code below (taken from a project of mine) allows you to select a file in a folder, and not open a new window if needed, it selects the file if the folder is already open in a window.

I might pull request it if I can get this project to compile on my own.

(btw i love using this image viewer it's so good)

const char* path_to_file = "C:\\path\\to\\cool.jpeg";
ITEMIDLIST* pidl         = ILCreateFromPath( path_to_file );

if ( pidl )
{
	SHOpenFolderAndSelectItems( pidl, 0, 0, 0 );
	ILFree( pidl );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant