-----------------------------------------------------------------------------*/
| 100 | |
| 101 | /*-----------------------------------------------------------------------------*/ |
| 102 | HWND |
| 103 | mswin_init_menu_window(int type) |
| 104 | { |
| 105 | HWND ret; |
| 106 | RECT rt; |
| 107 | |
| 108 | /* get window position */ |
| 109 | if (GetNHApp()->bAutoLayout) { |
| 110 | SetRect(&rt, 0, 0, 0, 0); |
| 111 | } else { |
| 112 | mswin_get_window_placement(NHW_MENU, &rt); |
| 113 | } |
| 114 | |
| 115 | /* create menu window object */ |
| 116 | ret = CreateDialog(GetNHApp()->hApp, MAKEINTRESOURCE(IDD_MENU), |
| 117 | GetNHApp()->hMainWnd, MenuWndProc); |
| 118 | if (!ret) { |
| 119 | panic("Cannot create menu window"); |
| 120 | } |
| 121 | |
| 122 | /* move it in the predefined position */ |
| 123 | if (!GetNHApp()->bAutoLayout) { |
| 124 | MoveWindow(ret, rt.left, rt.top, rt.right - rt.left, |
| 125 | rt.bottom - rt.top, TRUE); |
| 126 | } |
| 127 | |
| 128 | /* Set window caption */ |
| 129 | SetWindowText(ret, "Menu/Text"); |
| 130 | |
| 131 | mswin_apply_window_style(ret); |
| 132 | |
| 133 | SetMenuType(ret, type); |
| 134 | return ret; |
| 135 | } |
| 136 | /*-----------------------------------------------------------------------------*/ |
| 137 | int |
| 138 | mswin_menu_window_select_menu(HWND hWnd, int how, MENU_ITEM_P **_selected, |
no test coverage detected