You could try this -
Code:
Function: PlayMidi() // // Purpose: Plays a midi file
BOOL PlayMidi(char *sFileName)
{
char buf[256];
sprintf(buf, "open %s type sequencer alias MUSIC", sFileName);
if (mciSendString("close all", NULL, 0, NULL) != 0)
return(FALSE); }
if (mciSendString(buf, NULL, 0, NULL) != 0)
return(FALSE);
if (mciSendString("play MUSIC from 0", NULL, 0, g_hWnd) != 0)
return(FALSE);
// Yahoo!
return TRUE;
}
I couldn't find it on the latest MSDN (it was on an older version), and haven't tried it so don't know it it works but you could try calling it from your WM_CREATE message handler.