我用MCIWndCreate()创建了一介播放窗口,我想在放完一首的时候接着放另一首,可是不知道什么时候完,各位帮帮忙?!

解决方案 »

  1.   

    The MCIWNDM_NOTIFYMODE message notifies the parent window of an application that the operating mode of the MCI device has changed. The lParam parameter of this message identifies the new mode, such as MCI_MODE_STOP.
      

  2.   

    dwMCIWndStyle = WS_CHILD |     // child window
                    WS_VISIBLE |               // visible
                    MCIWNDF_NOTIFYMODE |       // notifies of mode changes
                    MCIWNDF_NOPLAYBAR;             // hides toolbar 
                g_hwndMCIWnd = MCIWndCreate(hwnd, 
                    g_hinst, dwMCIWndStyle, NULL); 
        case MCIWNDM_NOTIFYMODE: 
        if (lParam == MCI_MODE_STOP)  // device stopped
        { 
            MessageBox(hwnd,"","Closing Device",MB_OK); 
            MCIWndClose(g_hwndMCIWnd); 
        }