| 172 | INT_PTR CALLBACK ExtCmdDlgProc(HWND, UINT, WPARAM, LPARAM); |
| 173 | |
| 174 | int |
| 175 | mswin_ext_cmd_window(int *selection) |
| 176 | { |
| 177 | if (iflags.debug_fuzzer) { |
| 178 | *selection = rnd_extcmd_idx(); |
| 179 | |
| 180 | if (*selection != -1) |
| 181 | return IDOK; |
| 182 | else |
| 183 | return IDCANCEL; |
| 184 | } |
| 185 | |
| 186 | INT_PTR ret; |
| 187 | struct extcmd_data data; |
| 188 | |
| 189 | /* init dialog data */ |
| 190 | ZeroMemory(&data, sizeof(data)); |
| 191 | *selection = -1; |
| 192 | data.selection = selection; |
| 193 | |
| 194 | /* create modal dialog window */ |
| 195 | ret = DialogBoxParam(GetNHApp()->hApp, MAKEINTRESOURCE(IDD_EXTCMD), |
| 196 | GetNHApp()->hMainWnd, ExtCmdDlgProc, (LPARAM) &data); |
| 197 | if (ret == -1) |
| 198 | panic("Cannot create extcmd window"); |
| 199 | return (int) ret; |
| 200 | } |
| 201 | |
| 202 | INT_PTR CALLBACK |
| 203 | ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) |
no test coverage detected