IntCheckMenuItem(PMENU MenuObject, UINT uIDCheckItem, UINT uCheck)
has an OFF-BY-ONE issue in IN-parameter 'uIDCheckItem':
(void)CheckMenuItem(hMenu, 2, MF_CHECKED);
When you call this on Windows, the second item in the menu is checked (correct)
When you call this on ROS, the first item in the menu is checked (wrong)
I verified that by a cross test!
You can see this symptom in ros-kbswitch-tool when checking active keyboard layout!
Works on Windows, but always sets the checkbox off-by-one in ros
calls (void)CheckMenuItem(hMenu, ulCurrentLayoutNum, MF_CHECKED);