Thema: C++ case von to

Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#5

AW: case von to

  Alt 10. Aug 2017, 20:37
OK dann zurück zu DOS Zeiten.
Also das hat Delphi besser gelöst. thumbs-up für Delphi.
Eventuell auf Max 4 einstellen kann mir nicht vorstellen das es mehr als 4 AudioStreams in einem Video gibt.
Code:
        case ID_SELECTAUDIOSTREAM:
        case ID_SELECTAUDIOSTREAM + 1:
        case ID_SELECTAUDIOSTREAM + 2:
        case ID_SELECTAUDIOSTREAM + 3:
        case ID_SELECTAUDIOSTREAM + 4:
        case ID_SELECTAUDIOSTREAM + 5:
        case ID_SELECTAUDIOSTREAM + 6:
        case ID_SELECTAUDIOSTREAM + 7:
        case ID_SELECTAUDIOSTREAM + 8:
        case ID_SELECTAUDIOSTREAM_LAST:
        {
            TPlayerState ps = KVideo_GetPlayerState();
            if (ps == psNotReady)
                return 0;

            if (ps == psPlaying)
                KVideo_Pause();

            DWORD AudioSelectItem = (DWORD)wParam - ID_SELECTAUDIOSTREAM;

            KVideo_SelectAudioStream(AudioSelectItem);
            CheckMenuItem(hSubMenuAudio, (UINT)wParam, MF_CHECKED);
            MenuAudioChecked = AudioSelectItem;
            if (ps == psPlaying)
                KVideo_Play();
        }
        break;
gruss

Geändert von EWeiss (11. Jul 2019 um 15:48 Uhr)
  Mit Zitat antworten Zitat