It's faster to set these flags in a single operation (since the ORing gets done at compile time):

```
  UINT flagChecked = checked ? MF_CHECKED | MF_BYCOMMAND : MF_UNCHECKED | MF_BYCOMMAND;
  CheckMenuItem(menu, id, flagChecked);
```

Same comment for enable flag above.