* Initializes the ListView control that shows the key mappings. * * @param The handle of the Map Input dialog. * * @return The handle of the ListView control. **/
| 286 | * @return The handle of the ListView control. |
| 287 | **/ |
| 288 | HWND InitializeListView(HWND hwndDlg) |
| 289 | { |
| 290 | HWND hwndListView = GetDlgItem(hwndDlg, LV_MAPPING); |
| 291 | LVCOLUMN lv; |
| 292 | |
| 293 | // Set full row select. |
| 294 | SendMessage(hwndListView, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT); |
| 295 | |
| 296 | // Init ListView columns. |
| 297 | memset(&lv, 0, sizeof(lv)); |
| 298 | lv.mask = LVCF_TEXT | LVCF_WIDTH; |
| 299 | lv.pszText = "Type"; |
| 300 | lv.cx = 80; |
| 301 | |
| 302 | SendMessage(hwndListView, LVM_INSERTCOLUMN, (WPARAM)0, (LPARAM)&lv); |
| 303 | |
| 304 | lv.pszText = "Command"; |
| 305 | lv.cx = 240; |
| 306 | |
| 307 | SendMessage(hwndListView, LVM_INSERTCOLUMN, (WPARAM)1, (LPARAM)&lv); |
| 308 | |
| 309 | lv.mask ^= LVCF_WIDTH; |
| 310 | lv.fmt = LVCFMT_LEFT; |
| 311 | lv.pszText = "Input"; |
| 312 | |
| 313 | SendMessage(hwndListView, LVM_INSERTCOLUMN, (WPARAM)2, (LPARAM)&lv); |
| 314 | |
| 315 | return hwndListView; |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * Fills the filter combobox. |
no outgoing calls
no test coverage detected