/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

  1. /*
  2. noMeiryoUI (C) 2005,2012-2016 Tatsuhiko Shoji
  3. The sources for noMeiryoUI are distributed under the MIT open source license
  4. */
  5. #ifndef TWRMENU_H
  6. #define TWRMENU_H
  7. #include <tchar.h>
  8. class TwrMenu {
  9. private:
  10. HMENU menuHandle;
  11. public:
  12. TwrMenu(HWND wnd);
  13. TwrMenu(HMENU menu);
  14. void CheckMenuItem(int id,bool checked);
  15. bool isChecked(int item);
  16. void setEnabled(int id, bool enabled);
  17. void setText(int id, const TCHAR *message, BOOL byPosition = TRUE);
  18. /**
  19. * Tuj[擾B
  20. *
  21. * @param pos j[̈ʒu(0`)
  22. * @return Tuj[̃IuWFNg
  23. */
  24. TwrMenu *getSubMenu(int pos) {
  25. HMENU hMenu = GetSubMenu(menuHandle, pos);
  26. return new TwrMenu(hMenu);
  27. }
  28. };
  29. #endif