HMENU sub = GetSubMenu(menu, 0);  if(sub != NULL) { CheckMenuItem(sub, ID_OPTIONS_FRAMESKIP_THROTTLE_NOTHROTTLE, CHECKMENUSTATE(throttle == 0)); CheckMenuItem(sub, ID_OPTIONS_FRAMESKIP_THROTTLE_25, CHECKMENUSTATE(throttle == 25)); CheckMenuItem(sub, ID_OPTIONS_FRAMESKIP_THROTTLE_50, CHECKMENUSTATE(throttle == 50)); CheckMenuItem(sub, ID_OPTIONS_FRAMESKIP_THROTTLE_100, CHECKMENUSTATE(throttle == 100)); CheckMenuItem(sub, ID_OPTIONS_FRAMESKIP_THROTTLE_150, CHECKMENUSTATE(throttle == 150)); CheckMenuItem(sub, ID_OPTIONS_FRAMESKIP_THROTTLE_200, CHECKMENUSTATE(throttle == 200)); CheckMenuItem(sub, ID_OPTIONS_FRAMESKIP_THROTTLE_OTHER, CHECKMENUSTATE(throttle != 0 && throttle != 25 && throttle != 50 && throttle != 100 && throttle != 150 && throttle != 200)); }
void updateFrameSkipMenu(HMENU menu){  menu = GetSubMenu(menu, MENU_OPTIONS_FRAME_SKIP);  if(menu == NULL)    return;  if(cartridgeType == 0) {    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_0,                  CHECKMENUSTATE(frameSkip == 0));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_1,                  CHECKMENUSTATE(frameSkip == 1));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_2,                  CHECKMENUSTATE(frameSkip == 2));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_3,                  CHECKMENUSTATE(frameSkip == 3));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_4,                  CHECKMENUSTATE(frameSkip == 4));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_5,                  CHECKMENUSTATE(frameSkip == 5));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_6,                  CHECKMENUSTATE(frameSkip == 6));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_7,                  CHECKMENUSTATE(frameSkip == 7));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_8,                  CHECKMENUSTATE(frameSkip == 8));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_9,                  CHECKMENUSTATE(frameSkip == 9));  } else {    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_0,                  CHECKMENUSTATE(gbFrameSkip == 0));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_1,                  CHECKMENUSTATE(gbFrameSkip == 1));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_2,                  CHECKMENUSTATE(gbFrameSkip == 2));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_3,                  CHECKMENUSTATE(gbFrameSkip == 3));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_4,                  CHECKMENUSTATE(gbFrameSkip == 4));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_5,                  CHECKMENUSTATE(gbFrameSkip == 5));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_6,                  CHECKMENUSTATE(gbFrameSkip == 6));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_7,                  CHECKMENUSTATE(gbFrameSkip == 7));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_8,                  CHECKMENUSTATE(gbFrameSkip == 8));    CheckMenuItem(menu, ID_OPTIONS_VIDEO_FRAMESKIP_9,                  CHECKMENUSTATE(gbFrameSkip == 9));  }  CheckMenuItem(menu, ID_OPTIONS_FRAMESKIP_AUTOMATIC,                CHECKMENUSTATE(autoFrameSkip));}