#include "winuser.h" void __fastcall TForm1::sButton1Click(TObject *Sender)
{
TStringList* ptSList = new TStringList();
ptSList->Clear();
ptSList->Add("MYWAV SOUND \"1.mp3\"");
ptSList->SaveToFile("a.rc");
delete ptSList;
// потом добавить в проэкт a.rc
}
void __fastcall TForm1::sButton2Click(TObject *Sender)
{
char *pchResType = "SOUND";
TResourceStream* ptRes =
new TResourceStream((int)HInstance, "MYWAV",pchResType);
//Ia yoi yoaia ii?ii nio?aieou
ptRes->SaveToFile("11.mp3");
//Caanu aicii?ii caionoeou nenoaiiue ieaa?
ShellExecute(Handle,"open","11.mp3",NULL,NULL,SW_SHOWNORMAL);
//Ii?ii aini?iecaanoe ec iaiyoe
//unsigned char * puchResourceBuffer =
new unsigned char[ptRes->Size];
//ptRes->Read(puchResourceBuffer,ptRes->Size);
//sndPlaySound(puchResourceBuffer, SND_SYNC | SND_MEMORY);
delete ptRes;
}