Sun May 30, 2010 3:07 am
Sun May 30, 2010 10:25 am
windexlight wrote:so far I'm impressed with the interface.
windexlight wrote:How does Coollector decide which executable to use for playing a given file extension
Sun May 30, 2010 8:51 pm
Sun May 30, 2010 9:08 pm
windexlight wrote:ShellExecute( NULL, "open", "path_to_file", NULL, NULL, SW_SHOW );
This doesn't give you the ability to specify a custom command line
windexlight wrote:What API(s) are you using now, out of curiosity?
void PlayVideoFile(wxString Location)
{
wxString extension = Location.AfterLast('.');
wxFileType * filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(extension);
if ( filetype )
{
wxString cmd = filetype->GetOpenCommand("");
cmd.Replace("""", "-f "" + Location + """); // -f => fullscreen
wxExecute(cmd);
}
else
{
ShellExecute(NULL, NULL, Location, NULL, NULL, SW_SHOWNORMAL);
}
}
windexlight wrote:I could compile a simple test to see if I can reproduce the problem I'm getting in Coollector.
Mon May 31, 2010 6:05 am
extension = mkv
command line = "C:\Program Files\MPC HomeCinema (x64)\mpc-hc64.exe" ""
const unsigned long bufSize = 255;
DWORD numChars = bufSize;
wchar_t regStr[ bufSize + 1 ];
HRESULT r = AssocQueryString( (ASSOCF)NULL, ASSOCSTR_EXECUTABLE, (LPCTSTR)L".mkv", (LPCTSTR)L"open",
(LPTSTR)®Str, &numChars );
"C:\Program Files (x86)\SMPlayer\smplayer.exe"
Mon May 31, 2010 9:50 am
Mon May 31, 2010 9:07 pm
const unsigned long bufSize = 255;
DWORD numChars = bufSize;
char regStr[ bufSize + 1 ];
HRESULT r = AssocQueryStringA( (ASSOCF)NULL, ASSOCSTR_EXECUTABLE, (LPCSTR)".mkv", (LPCSTR)"open", (LPSTR)regStr, &numChars );
Mon May 31, 2010 9:27 pm
Mon May 31, 2010 11:53 pm
Tue Jun 01, 2010 1:29 am
Tue Jun 01, 2010 1:56 am
Tue Jun 01, 2010 7:31 am
Tue Jun 01, 2010 11:24 am
windexlight wrote:Sorry it was giving you so much trouble.
windexlight wrote:I'm not sure why AssocQueryString was putting up such a fight, but you managed to use ShellExecute okay.
Tue Jun 01, 2010 11:49 pm