TO: snsins
C里面有可以直接调用的函数么 ?

解决方案 »

  1.   

    TO :snsins
    在C里面有可以直接调用的函数?
      

  2.   

    MCIWND有直接的函数给你帖个例子
    能不能多给点分???//Linked with  winmm.lib、vfw32.lib
    #include<windows.h>
    #include<vfw.h>
    #include<mmsystem.h>int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
       LPSTR lpCmdLine,int nCmdShow)
    {    OPENFILENAME openfile;
        char szFileName[MAX_PATH]="";
    //设置打开文件对话框的风格
        
    ZeroMemory(&openfile, sizeof(openfile));
        openfile.lStructSize = sizeof(openfile);
        openfile.hwndOwner =NULL;
        openfile.lpstrFilter = "多媒体文件(*.*)\0*.*";
        openfile.nFilterIndex = 1;
        openfile.lpstrFile = szFileName;
        openfile.nMaxFile = sizeof(szFileName);
        openfile.lpstrTitle = "打开文件";
        openfile.Flags =OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;///////////////////////////////////////////////////////////////////////////////////////////////////////////    if(GetOpenFileName(&openfile))
    {
        MSG msg;
          
        MCIWndCreate(//创建MCIWnd窗口
    NULL,
    hInstance,
    MCIWNDF_SHOWALL,
    szFileName);
       

    while(GetMessage(&msg,NULL,0,0))//消息循环 {
            TranslateMessage(&msg);

                DispatchMessage(&msg);  
                
    }

    return(msg.wParam); //程序结束
    }
    }