From 53361319ee1c3fdb827b308049a1f9629c904467 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Mon, 7 Jan 2013 08:38:10 +0100 Subject: [PATCH] WIP On adding menu generation on Win32 --- ogl_editor/src/windows/RocketWindow.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/ogl_editor/src/windows/RocketWindow.c b/ogl_editor/src/windows/RocketWindow.c index f8edc37..4bc3e4e 100644 --- a/ogl_editor/src/windows/RocketWindow.c +++ b/ogl_editor/src/windows/RocketWindow.c @@ -157,6 +157,39 @@ bool createWindow(const wchar_t* title, int width, int height) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +static void buildSubMenu(HMENU menu, MenuDescriptor menuDesc[]) +{ + MenuDescriptor* desc = &menuDesc[0]; + + while (desc->name) + { + if (desc->id == EDITOR_MENU_SEPARATOR) + { + AppendMenu(MF_SEPARATOR, NULL, "-"); + } + else if (desc->id == EDITOR_MENU_SUB_MENU) + { + // fix submenu here + } + else + { + //&New\tCtrl+N + AppendMenu(hSubMenu, MF_STRING, desc->id, "&Go"); + + } + + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void Window_buildMenu() +{ + HMENU menu = GetMenu(s_window); +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + void Window_setTitle(const wchar_t* title) { SetWindowText(s_window, title);