Archived

This topic is now archived and is closed to further replies.

creator

very simple MCI question

Recommended Posts

I''m kinda stuck with MCI device... all i''m trying to do - play avi file, so here''s what i do: 1. create dialod based app in VC++, add mmsystem.h to my dialog cpp file and winmm.lib to project. 2. in InitDialog method i write - HWND hMCI=MCIWndCreate(wnd, AfxGetApp()->m_hInstance, MCIWNDF_SHOWALL, "c:\\video.avi"); 3. i compile project... 4 i get 3 errors : the one that is bothering me is -- "MCIWndCreate: undeclared indentifier"... Can anyone tell me what am i doing wrong?... Another question is: in function MCIWndCreate first parameter is a handle to parent window... how do i know what that handle is?... is it m_hWnd ??? ANY advice is very appreciated. thanks.

Share this post


Link to post
Share on other sites
The window handle should be the handle to whatever window you initially created. If you stored this to m_hwnd, then that would be it.

You should be including mmsystem.h at the top and putting winmm.lib in your project links in order to use the MCI command sets, which you apparently realize. You should also be inluding vfw.h and putting vfw32.lib in your project links in order to use the MCI window classes. Make sure you have this. This is most likely why your MCIWndCreate is not found.

-fel

Share this post


Link to post
Share on other sites