/program/TWR/TwrMenu.h
https://github.com/Tatsu-syo/noMeiryoUI · C Header · 35 lines · 19 code · 6 blank · 10 comment · 0 complexity · 1136b0c88a06e364021a99927bbeb61e MD5 · raw file
- /*
- noMeiryoUI (C) 2005,2012-2016 Tatsuhiko Shoji
- The sources for noMeiryoUI are distributed under the MIT open source license
- */
- #ifndef TWRMENU_H
- #define TWRMENU_H
-
- #include <tchar.h>
-
- class TwrMenu {
- private:
- HMENU menuHandle;
- public:
- TwrMenu(HWND wnd);
- TwrMenu(HMENU menu);
-
- void CheckMenuItem(int id,bool checked);
- bool isChecked(int item);
- void setEnabled(int id, bool enabled);
- void setText(int id, const TCHAR *message, BOOL byPosition = TRUE);
-
- /**
- * Tuj[擾B
- *
- * @param pos j[̈ʒu(0`)
- * @return Tuj[̃IuWFNg
- */
- TwrMenu *getSubMenu(int pos) {
- HMENU hMenu = GetSubMenu(menuHandle, pos);
- return new TwrMenu(hMenu);
- }
- };
-
-
- #endif