Blight
29th February 2004, 02:27
The following list is in reality 1 line, in delphi it's the "Filters" property of a TOpenDialog component and in C++/WinAPI it's the "lpstrFilter" value of the "OpenFilename" structure used with the "GetOpenFileName" WinAPI function (under WinAPI the "|" characters would be null characters, they are just listed as "|" for clarity and delphi compatibility {delphi convers the "|" to Ascii #0 before passing it along to the WinAPI function).
Media Files|VIDEO_TS.IFO;*.TRAILERS;*.URL;*.ASX;*.B4S;
*.M3U;*.PLS;*.WPL;*.ZPL;*.ASF;*.AVI;*.AVS;*.DAT;*.FLC;
*.FLI;*.MKV;*.MOV;*.MP4;*.MPG;*.MPEG;*.M2V;*.OGM;*.PART;
*.VOB;*.RM;*.RAM;*.RMM;*.RMVB;*.SWF;*.TS;*.TP;*.WMV;
*.AAC;*.AC3;*.APE;*.CDA;*.DTS;*.FLAC;*.MID;*.MKA;*.MP2;
*.MP3;*.MPA;*.MPC;*.OGG;*.RA;*.WAV;*.WMA;*.7Z;*.ARJ;*.BZ2;
*.CAB;*.RAR;*.ZIP|
Video Files|*.ASX;*.B4S;*.M3U;*.PLS;*.WPL;*.ZPL;*.ASF;
*.AVI;*.AVS;*.DAT;*.FLC;*.FLI;*.MKV;*.MOV;*.MP4;*.MPG;
*.MPEG;*.M2V;*.OGM;*.PART;*.VOB;*.RM;*.RAM;*.RMM;
*.RMVB;*.SWF;*.TS;*.TP;*.WMV;*.7Z;*.ARJ;*.BZ2;*.CAB;
*.RAR;*.ZIP|
Audio Files|*.ASX;*.B4S;*.M3U;*.PLS;*.WPL;*.ZPL;*.AAC;
*.AC3;*.APE;*.CDA;*.DTS;*.FLAC;*.MID;*.MKA;*.MP2;*.MP3;
*.MPA;*.MPC;*.OGG;*.RA;*.WAV;*.WMA;*.7Z;*.ARJ;*.BZ2;
*.CAB;*.RAR;*.ZIP|
Play Lists|*.ASX;*.B4S;*.M3U;*.PLS;*.WPL;*.ZPL;*.7Z;
*.ARJ;*.BZ2;*.CAB;*.RAR;*.ZIP|
CD Audio|*.CDA|
Images|*.BMP;*.GIF;*.JPEG;*.JPG;*.JPS;*.PNG|
All Files|*.*'
This massive list of extension is used for filtering in the windows open dialog. It is divided into several categories (Media Files, Video Files, Audio Files, Play Lists, CD Audio, Images and All Files).
Ok, and here is where the trouble arises... If the list of extensions in one of the categories is too big, that category basically becomes disfunctional (while all other categories seem to work).
The filter list is passed to the WinAPI function as one string, the string doesn't get truncated as categories further down the string work just fine, the only category that fails in the string specified above is the "Media Files" category which is ... HUGE.
This seem to be a bug in windows (using fully patched Windows XP here), I haven't found any mention of it (searched google quite a bit), anyone have an idea what can be done, I'd rather not write my own open-dialog component from scratch...
Media Files|VIDEO_TS.IFO;*.TRAILERS;*.URL;*.ASX;*.B4S;
*.M3U;*.PLS;*.WPL;*.ZPL;*.ASF;*.AVI;*.AVS;*.DAT;*.FLC;
*.FLI;*.MKV;*.MOV;*.MP4;*.MPG;*.MPEG;*.M2V;*.OGM;*.PART;
*.VOB;*.RM;*.RAM;*.RMM;*.RMVB;*.SWF;*.TS;*.TP;*.WMV;
*.AAC;*.AC3;*.APE;*.CDA;*.DTS;*.FLAC;*.MID;*.MKA;*.MP2;
*.MP3;*.MPA;*.MPC;*.OGG;*.RA;*.WAV;*.WMA;*.7Z;*.ARJ;*.BZ2;
*.CAB;*.RAR;*.ZIP|
Video Files|*.ASX;*.B4S;*.M3U;*.PLS;*.WPL;*.ZPL;*.ASF;
*.AVI;*.AVS;*.DAT;*.FLC;*.FLI;*.MKV;*.MOV;*.MP4;*.MPG;
*.MPEG;*.M2V;*.OGM;*.PART;*.VOB;*.RM;*.RAM;*.RMM;
*.RMVB;*.SWF;*.TS;*.TP;*.WMV;*.7Z;*.ARJ;*.BZ2;*.CAB;
*.RAR;*.ZIP|
Audio Files|*.ASX;*.B4S;*.M3U;*.PLS;*.WPL;*.ZPL;*.AAC;
*.AC3;*.APE;*.CDA;*.DTS;*.FLAC;*.MID;*.MKA;*.MP2;*.MP3;
*.MPA;*.MPC;*.OGG;*.RA;*.WAV;*.WMA;*.7Z;*.ARJ;*.BZ2;
*.CAB;*.RAR;*.ZIP|
Play Lists|*.ASX;*.B4S;*.M3U;*.PLS;*.WPL;*.ZPL;*.7Z;
*.ARJ;*.BZ2;*.CAB;*.RAR;*.ZIP|
CD Audio|*.CDA|
Images|*.BMP;*.GIF;*.JPEG;*.JPG;*.JPS;*.PNG|
All Files|*.*'
This massive list of extension is used for filtering in the windows open dialog. It is divided into several categories (Media Files, Video Files, Audio Files, Play Lists, CD Audio, Images and All Files).
Ok, and here is where the trouble arises... If the list of extensions in one of the categories is too big, that category basically becomes disfunctional (while all other categories seem to work).
The filter list is passed to the WinAPI function as one string, the string doesn't get truncated as categories further down the string work just fine, the only category that fails in the string specified above is the "Media Files" category which is ... HUGE.
This seem to be a bug in windows (using fully patched Windows XP here), I haven't found any mention of it (searched google quite a bit), anyone have an idea what can be done, I'd rather not write my own open-dialog component from scratch...