• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision7126 (tree)
Time2018-06-02 17:34:43
Authormaya

Log Message

Windows95/98/Me/NT4 で TTXResizeMenu のメニューが表示されない問題を修正

Change Summary

Incremental Difference

--- trunk/TTXSamples/TTXResizeMenu/TTXResizeMenu.c (revision 7125)
+++ trunk/TTXSamples/TTXResizeMenu/TTXResizeMenu.c (revision 7126)
@@ -232,8 +232,14 @@
232232 if (pvar->MenuItems > 0) {
233233 InitMenu();
234234
235- memset(&mi, 0, sizeof(mi));
236- mi.cbSize = sizeof(mi);
235+ if (IsWindows2000OrLater()) {
236+ memset(&mi, 0, sizeof(MENUITEMINFO));
237+ mi.cbSize = sizeof(MENUITEMINFO);
238+ }
239+ else {
240+ memset(&mi, 0, sizeof(MENUITEMINFO)-sizeof(HBITMAP));
241+ mi.cbSize = sizeof(MENUITEMINFO)-sizeof(HBITMAP);
242+ }
237243 mi.fMask = MIIM_TYPE | MIIM_SUBMENU;
238244 mi.fType = MFT_STRING;
239245 mi.hSubMenu = pvar->ResizeMenu;
Show on old repository browser