menu = GetSubMenu(menu, 7);
HMENU sub = GetSubMenu(menu, 7); if(sub == NULL) sub = GetSubMenu(menu, 8);
void updateEmulatorMenu(HMENU menu){  menu = GetSubMenu(menu, MENU_OPTIONS_EMULATOR);  if(menu == NULL)    return;  EnableMenuItem(menu, ID_OPTIONS_EMULATOR_DIRECTORIES,                 ENABLEMENU(videoOption != VIDEO_320x240));    CheckMenuItem(menu, ID_OPTIONS_EMULATOR_SYNCHRONIZE,                CHECKMENUSTATE(synchronize));  CheckMenuItem(menu, ID_OPTIONS_EMULATOR_DISABLESTATUSMESSAGES,                CHECKMENUSTATE(disableStatusMessage));    CheckMenuItem(menu, ID_OPTIONS_EMULATOR_USEBIOSFILE,                CHECKMENUSTATE(useBiosFile));  CheckMenuItem(menu, ID_OPTIONS_EMULATOR_PAUSEWHENINACTIVE,                CHECKMENUSTATE(pauseWhenInactive));  CheckMenuItem(menu, ID_OPTIONS_EMULATOR_SPEEDUPTOGGLE,                CHECKMENUSTATE(speedupToggle));  CheckMenuItem(menu, ID_OPTIONS_EMULATOR_REMOVEINTROSGBA,                CHECKMENUSTATE(removeIntros));  EnableMenuItem(menu, ID_OPTIONS_EMULATOR_USEBIOSFILE,                 ENABLEMENU(biosFileName[0]));    CheckMenuItem(menu, ID_OPTIONS_EMULATOR_PNGFORMAT,                CHECKMENUSTATE(captureFormat == 0));  CheckMenuItem(menu, ID_OPTIONS_EMULATOR_BMPFORMAT,                CHECKMENUSTATE(captureFormat != 0));  menu = GetSubMenu(menu, 7);  updateSaveTypeMenu(menu);}