Author |
Topic: GetOpenFileName selecting *multiple* files? (Read 566 times) |
|
Malcolm
Guest
|
 |
Re: GetOpenFileName selecting *multiple* files?
« Reply #19 on: Feb 22nd, 2010, 3:51pm » |
|
If it finds a codec it will play other types. I just can't predict what file extensions might be used in the furute.
No extension give a "Wrong File Type" error.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: GetOpenFileName selecting *multiple* files?
« Reply #20 on: Feb 22nd, 2010, 4:59pm » |
|
on Feb 22nd, 2010, 3:51pm, Guest-Malcolm wrote:| No extension give a "Wrong File Type" error. |
|
A possible explanation is that Windows Media Player is probably using Direct Show (or something even more modern!) and your program is using MCI. It may well be that MCI still uses the file extension to identify the type.
later Confirmed it: I can play my renamed MP3 file (with no extension) using the Direct Show code here:
http://bb4w.wikispaces.com/Playing+a+media+file+using+Direct+Show
Fortunately for you, as far as audio is concerned MCI still seems to support all the common formats. For video, it's no longer very satisfactory to use MCI since too many formats only have Direct Show (or later) codecs.
Richard.
|
|
Logged
|
|
|
|
Malcolm
Guest
|
 |
Re: GetOpenFileName selecting *multiple* files?
« Reply #21 on: Feb 25th, 2010, 5:45pm » |
|
Quote:In fact I don't think the order of the returned files is guaranteed to have any specific relationship with the order in which they are selected (especially if you use Shift+LeftClick to do the multi-selection, because then they weren't selected in any order!). |
|
Absolutely they are. That will be the last selected file (or the end of the shift left click selection), then the order in which they appear in the directory listing. If the file directory was sorted on a particular criterion prior to selection that is the order.
|
|
Logged
|
|
|
|
Malcolm
Guest
|
 |
Re: GetOpenFileName selecting *multiple* files?
« Reply #22 on: Feb 25th, 2010, 5:54pm » |
|
Quote:| Fortunately for you, as far as audio is concerned MCI still seems to support all the common formats. |
|
Unless anyone thinks that MCI is going away anytime soon, the Microsoft developers blog tells how they planned to get rid of MCI in the 64 bit platforms until they realized that CD support could not be done by any of the alternatives they had, so they put MCI back in. The question then becomes when can you end of life an API. They seemed to think it can only happen with a change of platform and when there are well accepted alternatives. That typically means 3 to 4 versions of windows after the alternative API is introduced. Or perhaps when CDs are the equivalent of 8-track.
So the next platform change after 64 bit might be some while. I'll certainly be too old to care.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: GetOpenFileName selecting *multiple* files?
« Reply #23 on: Feb 25th, 2010, 11:42pm » |
|
on Feb 25th, 2010, 5:45pm, Guest-Malcolm wrote: Link, please! Not that I disbelieve you, but I'd like to see it from the horse's mouth. On a quick search, I didn't manage to find anything in MSDN about the returned file order.
Richard.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: GetOpenFileName selecting *multiple* files?
« Reply #24 on: Feb 25th, 2010, 11:50pm » |
|
on Feb 25th, 2010, 5:54pm, Guest-Malcolm wrote:| Unless anyone thinks that MCI is going away anytime soon... |
|
MCI can't go away, any more than any other Windows API, but new audio formats can come along which MCI won't necessarily support. Is your audio player happy to play Ogg Vorbis files, for example? These are becoming increasingly popular.
Richard.
|
|
Logged
|
|
|
|
|