summaryrefslogtreecommitdiff
path: root/src/glut/glx/win32_menu.c
diff options
context:
space:
mode:
authorTed Jump <tjump@users.sourceforge.net>1999-09-17 03:07:28 +0000
committerTed Jump <tjump@users.sourceforge.net>1999-09-17 03:07:28 +0000
commit1f256fd6b39572e16cadb6460b865a128103bf18 (patch)
treee0461234d70b65b6bef85d41e0d25c4ef31db87b /src/glut/glx/win32_menu.c
parent3849b44d666482a14aac41f4e19a596c420cfa80 (diff)
Win32 build req't updates
Diffstat (limited to 'src/glut/glx/win32_menu.c')
-rw-r--r--src/glut/glx/win32_menu.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/glut/glx/win32_menu.c b/src/glut/glx/win32_menu.c
index 9b330644af..20485eea65 100644
--- a/src/glut/glx/win32_menu.c
+++ b/src/glut/glx/win32_menu.c
@@ -96,9 +96,8 @@ __glutFinishMenu(Window win, int x, int y)
static void
mapMenu(GLUTmenu * menu, int x, int y)
{
- TrackPopupMenu(menu->win, TPM_LEFTALIGN |
- __glutMenuButton == TPM_RIGHTBUTTON ?
- TPM_RIGHTBUTTON : TPM_LEFTBUTTON,
+ TrackPopupMenu((HMENU) menu->win, TPM_LEFTALIGN |
+ (__glutMenuButton == TPM_RIGHTBUTTON) ? TPM_RIGHTBUTTON : TPM_LEFTBUTTON,
x, y, 0, __glutCurrentWindow->win, NULL);
}
@@ -254,7 +253,7 @@ glutCreateMenu(GLUTselectCB selectFunc)
menu->cascade = NULL;
menu->highlighted = NULL;
menu->anchor = NULL;
- menu->win = CreatePopupMenu();
+ menu->win = (HWND) CreatePopupMenu();
menuList[menuid] = menu;
__glutSetMenu(menu);
return menuid + 1;
@@ -277,7 +276,7 @@ glutDestroyMenu(int menunum)
menuModificationError();
}
assert(menu->id == menunum - 1);
- DestroyMenu(menu->win);
+ DestroyMenu( (HMENU) menu->win);
menuList[menunum - 1] = NULL;
/* free all menu entries */
item = menu->list;
@@ -337,9 +336,9 @@ setMenuItem(GLUTmenuItem * item, const char *label,
item->value = value;
item->unique = uniqueMenuHandler++;
if (isTrigger) {
- AppendMenu(menu->win, MF_POPUP, (UINT)item->win, label);
+ AppendMenu((HMENU) menu->win, MF_POPUP, (UINT)item->win, label);
} else {
- AppendMenu(menu->win, MF_STRING, item->unique, label);
+ AppendMenu((HMENU) menu->win, MF_STRING, item->unique, label);
}
}
@@ -405,7 +404,7 @@ glutChangeToMenuEntry(int num, const char *label, int value)
need to account for submenus. */
item->menu->submenus--;
/* Nuke the Win32 menu. */
- DestroyMenu(item->win);
+ DestroyMenu((HMENU) item->win);
}
free(item->label);
@@ -416,7 +415,7 @@ glutChangeToMenuEntry(int num, const char *label, int value)
item->len = (int) strlen(label);
item->value = value;
item->unique = uniqueMenuHandler++;
- ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1,
+ ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,
MF_BYPOSITION | MFT_STRING, item->unique, label);
return;
@@ -445,7 +444,7 @@ glutChangeToSubMenu(int num, const char *label, int menu)
/* If changing a menu entry to as submenu trigger, we
need to account for submenus. */
item->menu->submenus++;
- item->win = CreatePopupMenu();
+ item->win = (HWND) CreatePopupMenu();
}
free(item->label);
@@ -459,7 +458,7 @@ glutChangeToSubMenu(int num, const char *label, int menu)
popupmenu = __glutGetMenuByNum(menu);
if (popupmenu)
item->win = popupmenu->win;
- ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1,
+ ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,
MF_BYPOSITION | MF_POPUP, (UINT) item->win, label);
return;
}
@@ -489,7 +488,7 @@ glutRemoveMenuItem(int num)
/* Patch up menu's item list. */
*prev = item->next;
- RemoveMenu(__glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION);
+ RemoveMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION);
free(item->label);
free(item);