MCPcopy Create free account
hub / github.com/TASEmulators/fceux / InitializeListView

Function InitializeListView

src/drivers/win/mapinput.cpp:288–316  ·  view source on GitHub ↗

* Initializes the ListView control that shows the key mappings. * * @param The handle of the Map Input dialog. * * @return The handle of the ListView control. **/

Source from the content-addressed store, hash-verified

286* @return The handle of the ListView control.
287**/
288HWND 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.

Callers 1

MapInputDialogProcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected