Login Page - Create Account

Support Board


Date/Time: Fri, 18 Oct 2024 06:14:49 +0000



Post From: retrieving string file name from settings to be played in playfile

[2015-10-23 11:46:08]
KhaosTrader - Posts: 128
Actually, I found out a way to do it, is this an appropriate way?



    if
      (
        (sc.DownloadingHistoricalData == 0) &&
        (sc.Index > sc.ArraySize - 5)
        )
    {


      char * RootFileName = new char[std::strlen(EntryAlert_RootFileName.GetString())];
      std::strcpy(RootFileName, EntryAlert_RootFileName.GetString());
      SCString Buffer;
      Buffer.Format("c:\\!TradeAlert_Sounds\\%s_Long.wav", RootFileName);


      sc.PlaySound(Buffer.GetChars(), 1);



    }