[GD-General] Windows Media Player
Brought to you by:
vexxed72
From: scoubidou944 <sco...@ho...> - 2003-12-17 20:55:13
|
hi, writing an application for multimedia presentation, I must (too long to explain why ;p) use Windows Media Player 9 (not Media Classic Player) to play video files. But I have one problem : getting play list. First method : Get HWND of WMPlayer Use Spy++ Visual Tool to get HWND so we have : WMP WMPAppHost "WMPAppHost" WMPPlaylist "" ATL:SysListView32 "Current Playlist" SysHeader32 Using FindWindowEx() I get an HWD on 'ATL:SysListView32' hCurrentWnd = // Windows Media Player handke hWndAppHost = FindWindowEx (hCurrentWnd, NULL, "WMPAppHost", NULL); hWndPlayList = FindWindowEx (hWndAppHost, NULL, "WMPPlaylist", NULL); hCurrentList = FindWindowEx (hWndPlayList, NULL, "ATL:SysListView32", NULL); But using : u32ItemCount = ListView_GetItemCount (hCurrentList); return always 0 :( Does ListView_GetItemCount() limited to Current process ? or does it work only on standard object but non ATL ? Second Method : Getting system file access coming from WMP to get file added but a bit wild isn't it LOL ? Thirs method : Rerieve WMP file history.... not a good way too. Havin' an idea ? Thx Vincent. |