各位高手,如题,请问在利用VC++进行多媒体编程时,如何定义CMCIClass类,该类中的成员函数有什么作用?我现在是要利用它来进行一些关于midi文件的操作。
呵,我不知道这样把问题说清楚没有?高手们不要见笑啊!
我先在此谢过各位了!!

解决方案 »

  1.   

    可以使用MCIWnd类,在stdafx.h中添加
    #include <vfw.h>
    #pragma comment(lib,"vfw32.lib")在CXXXApp::InitInstance()中使用MCIWndRegisterClass注册MCI窗口类
    可以使用的函数有MCIWndCreate(),MCIWndOpen()
      

  2.   

    老兄,能不能说详细点啊?我很菜的。我先利用向导建了一个基于对话框的工程,在stdafx.h中加入了#include <vfw.h> ,但运行时出现了如下错误:
    --------------------Configuration: test - Win32 Debug--------------------
    Compiling resources...
    Compiling...
    StdAfx.cpp
    c:\program files\microsoft visual studio\vc98\include\vfw.h(67) : error C2146: syntax error : missing ';' before identifier 'FAR'
    c:\program files\microsoft visual studio\vc98\include\vfw.h(67) : error C2501: 'DWORD' : missing storage-class or type specifiers
    c:\program files\microsoft visual studio\vc98\include\vfw.h(67) : fatal error C1004: unexpected end of file found
    执行 cl.exe 时出错.   请问这是什么错误啊?另外,这个问题解决后,再照你说的在CXXXApp::InitInstance()中使用MCIWndRegisterClass注册MCI窗口类 ,是不是就可以在程序中用MCIWnd类实例化一个对象了啊?   谢谢你的帮助!!
      

  3.   

    3楼的问题解决了,我将#include <vfw.h>   #pragma comment(lib,"vfw32.lib") 
    两个语句添加到了stdafx.h中,没有错误。但接下来怎么创建MCIWnd类呢?
     我在MSDN中只查到关于MCIWND_WINDOW_CLASS的两行说明,但不知道怎么使用它来创建MCIWnd类,不知道在什么地方创建。
     哪位大侠能不能告诉我怎么做?或者提示一下在MSDN中怎么查找相关信息呢?
        
    若能帮我解决一楼的问题也可以,先谢谢了!