June 1, 200719 yr Hi,I trying to create a menu in FS9 with visual C++ with but I don't see it. Any idee?This is the code (source is fsmenu.zip of Cyril Hruscak)main.c#include #include "module.h"DLLEXPORT MODULE_IMPORT ImportTable = { {0x00000000, NULL}, {0x00000000, NULL}};void FSAPI module_init(void) {}void FSAPI module_deinit(void) {}DLLEXPORT MODULE_LINKAGE Linkage = { 0x00000000, module_init, module_deinit, 0, 0, 0x0900, NULL};WNDPROC oldWndProc;HWND hFSimWindow;#define MENU_ENTRY "My Mo&dule"#define ID_MY_MENUITEM 40001LRESULT CALLBACK FSimWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch (uMsg) { case WM_NCPAINT: { HMENU hMenu, hMyMenu; hMenu = GetMenu(hwnd); if (hMenu != NULL) { int i; for (i = 0; i < GetMenuItemCount(hMenu); i++) { char buf[128]; GetMenuString(hMenu, i, buf, 128, MF_BYPOSITION); if (strcmp(buf, MENU_ENTRY) == 0) { break; } } if (i < GetMenuItemCount(hMenu)) { break; } hMyMenu = CreateMenu(); AppendMenu(hMyMenu, MF_STRING | MF_ENABLED, ID_MY_MENUITEM, "My &First Menu Entry"); AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT_PTR)hMyMenu, MENU_ENTRY); } } break; case WM_COMMAND: if (LOWORD(wParam) == ID_MY_MENUITEM) { MessageBox(hwnd, "
Create an account or sign in to comment