(Gast)
n/a Beiträge
|
AW: Menu problem
10. Aug 2017, 02:28
trotzdem habe ich noch ein seltsames Phänomen.
Es werden bei mir beide Einträge in die jeweiligen Sub Menus gepackt.
Habe ich was übersehene?
Code:
// VideoStreams zum Menu addieren
AppendMenuW(hMenu, MF_STRING | MF_POPUP, (UINT_PTR)hSubMenu, L"Select video stream");
if (aMediaProperty.NumVideoStream == 0)
EnableMenuItem(hMenu, 5, MF_POPUP | MF_BYPOSITION | MF_DISABLED);
else
{
int IntI = 0;
for (IntI = 0; IntI < aMediaProperty.NumVideoStream; IntI++)
{
if (KVideo_GetStreamInfo(stVideo, IntI, &StreamInfo))
{
EnableMenuItem(hMenu, 5, MF_POPUP | MF_BYPOSITION | MF_ENABLED);
AppendMenuW(hSubMenu, MF_STRING, (UINT_PTR)ID_SELECTVIDEOSTREAM, StreamInfo.ppszName);
}
if (IntI = 0)
CheckMenuItem(hSubMenu, ID_SELECTVIDEOSTREAM, MF_CHECKED);
}
}
// AudioStreams zum Menu addieren
AppendMenuW(hMenu, MF_STRING | MF_POPUP, (UINT_PTR)hSubMenu, L"Select audio stream");
if (aMediaProperty.NumAudioStream == 0)
EnableMenuItem(hMenu, 6, MF_POPUP | MF_BYPOSITION | MF_DISABLED);
else
{
int IntI = 0;
for (IntI = 0; IntI < aMediaProperty.NumAudioStream; IntI++)
{
if (KVideo_GetStreamInfo(stAudio, IntI, &StreamInfo))
{
EnableMenuItem(hMenu, 6, MF_POPUP | MF_BYPOSITION | MF_ENABLED);
AppendMenuW(hSubMenu, MF_STRING, (UINT_PTR)ID_SELECTAUDIOSTREAM, StreamInfo.ppszName);
}
if (IntI = 0)
CheckMenuItem(hSubMenu, ID_SELECTAUDIOSTREAM, MF_CHECKED);
}
}
gruss
Geändert von EWeiss (11. Jul 2019 um 16:48 Uhr)
|
|
Zitat
|