scmno****@osdn*****
scmno****@osdn*****
2018年 6月 2日 (土) 17:34:43 JST
Revision: 7126 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7126 Author: maya Date: 2018-06-02 17:34:43 +0900 (Sat, 02 Jun 2018) Log Message: ----------- Windows95/98/Me/NT4 で TTXResizeMenu のメニューが表示されない問題を修正 Modified Paths: -------------- trunk/TTXSamples/TTXResizeMenu/TTXResizeMenu.c -------------- next part -------------- Modified: trunk/TTXSamples/TTXResizeMenu/TTXResizeMenu.c =================================================================== --- trunk/TTXSamples/TTXResizeMenu/TTXResizeMenu.c 2018-06-02 08:33:58 UTC (rev 7125) +++ trunk/TTXSamples/TTXResizeMenu/TTXResizeMenu.c 2018-06-02 08:34:43 UTC (rev 7126) @@ -232,8 +232,14 @@ if (pvar->MenuItems > 0) { InitMenu(); - memset(&mi, 0, sizeof(mi)); - mi.cbSize = sizeof(mi); + if (IsWindows2000OrLater()) { + memset(&mi, 0, sizeof(MENUITEMINFO)); + mi.cbSize = sizeof(MENUITEMINFO); + } + else { + memset(&mi, 0, sizeof(MENUITEMINFO)-sizeof(HBITMAP)); + mi.cbSize = sizeof(MENUITEMINFO)-sizeof(HBITMAP); + } mi.fMask = MIIM_TYPE | MIIM_SUBMENU; mi.fType = MFT_STRING; mi.hSubMenu = pvar->ResizeMenu;