??????C++????????????????????????
???????????? ???????[ 2016/1/26 10:34:48 ] ????????.NET ???????????
?????и???????????? 200 ??? C/C++ ?????????????? Php??Qt ?? Linux ?????????????????????????????????????????????????顣??????????? Miranda NG ???
??????????????
????#define MF_BYCOMMAND 0x00000000L
????void CMenuBar::updateState(const HMENU hMenu) const
????{
????....
????::CheckMenuItem(hMenu?? ID_VIEW_SHOWAVATAR??
????MF_BYCOMMAND | dat->bShowAvatar ? MF_CHECKED : MF_UNCHECKED);
????....
????}
????????????
??????????????????????????????????????????????????????????????????ú???
???????????????????????????е????????????????????£?????????Щ???????? C/C++ ????????????????????е????????????????????????????????????
???????????????????У?????????? CheckMenuItem() ???????λ???????? bShowAvatar ???? true?????????MF_BYCOMMAND ?? MF_CHECKED ??λ???????????? MF_UNCHECKED ????λ?????????????
????MF_BYCOMMAND | dat->bShowAvatar ? MF_CHECKED : MF_UNCHECKED
???????????????У???λ?????????????????????????????????????????????? if-then-else ????棩??
????MF_BYCOMMAND | dat->bShowAvatar ? MF_CHECKED : MF_UNCHECKED
?????????????λ??????? | ??????? ?: ????????????????? C/C++ ?????????????????????????????????
??????????????????????????????“dat->bShowAvatar”?????????“MF_BYCOMMAND | dat->bShowAvatar”??
???????????????????????????λ —— MF_CHECKED ?? MF_UNCHECKED?????λ MF_BYCOMMAND ???????
?????????????Щ????????????????????????????????????????????λ??????????????? MF_BYCOMMAND ???? 0x0000000L??
?????????λ MF_BYCOMMAND ???? 0??????????????κ?????????Щ?????????????????????????????????????????????????????е???ɡ?
??????????????????????????????
????MF_BYCOMMAND | (dat->bShowAvatar ? MF_CHECKED : MF_UNCHECKED)
??????????滻??
????0x00000000L | (dat->bShowAvatar ? 0x00000008L : 0x00000000L)
????????????“|”?????????????0?????????????????????
????dat->bShowAvatar ? 0x00000008L : 0x00000000L
?????????????????????????????壺
????MF_BYCOMMAND | dat->bShowAvatar ? MF_CHECKED : MF_UNCHECKED
??????????????
????0x00000000L | dat->bShowAvatar ? 0x00000008L : 0x00000000L
???????????“0x0000000L | dat->bShowAvatar”?У?????? | ??????????0?????????????
????dat->bShowAvatar ? 0x00000008L : 0x00000000L
??????????????????????????????????????????????????????????????????漣??
??????????????д??
?????к?????????????????δ??????????????????????????????????????????м????????????????????“if”??????????а?????
????if (dat->bShowAvatar)
????::CheckMenuItem(hMenu?? ID_VIEW_SHOWAVATAR??MF_BYCOMMAND | MF_CHECKED);
????else
????::CheckMenuItem(hMenu?? ID_VIEW_SHOWAVATAR??MF_BYCOMMAND | MF_UNCHECKED);
??????????????????????????????????ɡ??????????????????????е????????????????????á?
???????飺
???????????? —— ?跨???????????????????????????????????????У?????????????
???????????????? “?:”??Σ???????????????????????????????????д????????????????????????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11