Code:
void static CreateMenuSystem(HWND hwnd){
HMENU hMenu;
HMENU hSubMenu;
HMENU hSubSub;
hMenu = CreateMenu();
hSubMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&File");
AppendMenu(hSubMenu, MF_STRING, MENU_FILE_NEW, "&New\tCtrl+N");
AppendMenu(hSubMenu, MF_STRING, MENU_FILE_OPEN, "&Open...\tCtrl+O");
AppendMenu(hSubMenu, MF_SEPARATOR, 0, "");
AppendMenu(hSubMenu, MF_STRING, MENU_FILE_SAVE, "&Save\tCtrl+S");
AppendMenu(hSubMenu, MF_STRING, MENU_FILE_SAVEAS, "Save &as...");
AppendMenu(hSubMenu, MF_SEPARATOR, 0, "");
AppendMenu(hSubMenu, MF_STRING, MENU_FILE_PRINT, "&Print\tCtrl+P");
AppendMenu(hSubMenu, MF_SEPARATOR, 0, "");
AppendMenu(hSubMenu, MF_STRING, MENU_FILE_EXIT, "E&xit\tCtrl+Q");
hSubMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&Edit");
AppendMenu(hSubMenu, MF_STRING, MENU_EDIT_UNDO, "&Undo\tCtrl+Z");
AppendMenu(hSubMenu, MF_SEPARATOR, 0, "");
AppendMenu(hSubMenu, MF_STRING, MENU_EDIT_CUT, "Cu&t\tCtrl+X");
AppendMenu(hSubMenu, MF_STRING, MENU_EDIT_COPY, "&Copy\tCtrl+C");
AppendMenu(hSubMenu, MF_STRING, MENU_EDIT_PASTE, "&Paste\tCtrl+V");
AppendMenu(hSubMenu, MF_STRING, MENU_EDIT_DEL, "&Delete\tDel");
AppendMenu(hSubMenu, MF_SEPARATOR, 0, "");
AppendMenu(hSubMenu, MF_STRING, MENU_EDIT_SEL, "Select &All\tCtrl+A");
hSubMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&Search");
AppendMenu(hSubMenu, MF_STRING, MENU_SEARCH_FIND, "&Find\tAlt+F3");
AppendMenu(hSubMenu, MF_STRING, MENU_SEARCH_NEXT, "Find &Next\tF3");
AppendMenu(hSubMenu, MF_SEPARATOR, 0, "");
AppendMenu(hSubMenu, MF_STRING, MENU_SEARCH_REPLACE, "&Replace");
hSubSub = CreatePopupMenu();
AppendMenu(hSubMenu, MF_POPUP, (UINT)hSubSub, "&Goto");
AppendMenu(hSubSub, MF_STRING, MENU_SEARCH_TOP, "&Top\tCtrl+Home");
AppendMenu(hSubSub, MF_STRING, MENU_SEARCH_END, "&End\tCtrl+End");
AppendMenu(hSubSub, MF_STRING, MENU_SEARCH_LINE, "&Line\tCtrl+G");
hSubMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&Format");
AppendMenu(hSubMenu, MF_STRING, MENU_FMAT_WRAP, "&Word Wrap");
AppendMenu(hSubMenu, MF_STRING, MENU_FMAT_FONT, "&Font");
hSubMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&Insert");
AppendMenu(hSubMenu, MF_STRING, MENU_INSERT_TD, "&Time/Date");
AppendMenu(hSubMenu, MF_STRING, MENU_INSERT_DT, "&Date/Time");
AppendMenu(hSubMenu, MF_SEPARATOR, 0, "");
hSubSub = CreatePopupMenu();
AppendMenu(hSubMenu, MF_POPUP, (UINT)hSubSub, "&Html Scripts");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_FRAME, "&Frame Work");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_META, "&Meta Tags");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_LINK, "&Link Css");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_QUICK, "&Quick Link");
AppendMenu(hSubSub, MF_SEPARATOR, 0, "");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_MODIFIED, "Last M&odified");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_BROWSER, "&Browser in Use");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_CURRENT, "&Current URL");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_HIGHLIGHT, "&No Highlight");
AppendMenu(hSubSub, MF_SEPARATOR, 0, "");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_FONT, "&Text Font");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_IMAGE, "&Image");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_ORDERED, "Numb&ered List");
AppendMenu(hSubSub, MF_STRING, MENU_HTML_UNORDERED, "B&ulleted List");
hSubMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&Extras");
AppendMenu(hSubMenu, MF_STRING, MENU_EXTRA_UPPER, "&Uppercase");
AppendMenu(hSubMenu, MF_STRING, MENU_EXTRA_LOWER, "&Lowercase");
AppendMenu(hSubMenu, MF_SEPARATOR, 0, "");
AppendMenu(hSubMenu, MF_STRING, MENU_EXTRA_LINE, "&Line Count");
AppendMenu(hSubMenu, MF_STRING, MENU_EXTRA_SIZE, "&Estimate Size");
AppendMenu(hSubMenu, MF_STRING, MENU_EXTRA_INSTANCE, "&New Instance");
hSubMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&Help");
AppendMenu(hSubMenu, MF_STRING, MENU_HELP_TOPIC, "&Help Topics\tF1");
AppendMenu(hSubMenu, MF_STRING, MENU_HELP_SITE, "&Web Site");
AppendMenu(hSubMenu, MF_SEPARATOR, 0, "");
AppendMenu(hSubMenu, MF_STRING, MENU_HELP_ABOUT, "&About");
AppendMenu(hSubMenu, MF_STRING, MENU_HELP_VERSION, "&Version");
SetMenu(hwnd, hMenu);
}
Hope that helps.