MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / FillComboBox

Method FillComboBox

source/Configuration/PropertySheetHelper.cpp:86–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84*/
85
86void CPropertySheetHelper::FillComboBox(HWND window, int controlid, LPCTSTR choices, int currentchoice)
87{
88 _ASSERT(choices);
89 HWND combowindow = GetDlgItem(window, controlid);
90 SendMessage(combowindow, CB_RESETCONTENT, 0, 0);
91 while (choices && *choices)
92 {
93 SendMessage(combowindow, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)choices);
94 choices += strlen(choices)+1;
95 }
96
97 if (SendMessage(combowindow, CB_SETCURSEL, currentchoice, 0) == CB_ERR && currentchoice != -1)
98 {
99 _ASSERT(0);
100 SendMessage(combowindow, CB_SETCURSEL, 0, 0); // GH#434: Failed to set currentchoice, so select item-0
101 }
102}
103
104void CPropertySheetHelper::SaveComputerType(eApple2Type NewApple2Type)
105{

Callers 10

InitOptionsMethod · 0.80
InitCloneDropdownMenuMethod · 0.80
InitJoystickChoicesMethod · 0.80
InitOptionsMethod · 0.80
InitComboFloppyDriveMethod · 0.80
InitComboHDDMethod · 0.80
DlgProcSSCInternalMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected