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

Method DlgProcSSCInternal

source/Configuration/PageSlots.cpp:1013–1064  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1011}
1012
1013INT_PTR CPageSlots::DlgProcSSCInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
1014{
1015 switch (message)
1016 {
1017 case WM_COMMAND:
1018 switch (LOWORD(wparam))
1019 {
1020 case IDC_SERIALPORT:
1021 if (HIWORD(wparam) == CBN_SELCHANGE)
1022 {
1023 const UINT serialPortItem = (UINT)SendDlgItemMessage(hWnd, IDC_SERIALPORT, CB_GETCURSEL, 0, 0);
1024 m_PropertySheetHelper.GetConfigNew().m_serialPortItem = serialPortItem;
1025 }
1026 break;
1027
1028 case IDOK:
1029 EndDialog(hWnd, 0);
1030 break;
1031
1032 case IDCANCEL:
1033 EndDialog(hWnd, 0);
1034 break;
1035
1036 default:
1037 return FALSE;
1038 }
1039 break;
1040
1041 case WM_CLOSE:
1042 EndDialog(hWnd, 0);
1043 break;
1044
1045 case WM_INITDIALOG:
1046 {
1047 CSuperSerialCard& cardForConfig = m_PropertySheetHelper.GetConfigNew().m_SSC;
1048 const UINT serialPortItem = m_PropertySheetHelper.GetConfigNew().m_serialPortItem;
1049 m_PropertySheetHelper.FillComboBox(hWnd, IDC_SERIALPORT, cardForConfig.GetSerialPortChoices().c_str(), serialPortItem);
1050
1051 BOOL enable = TRUE;
1052 CSuperSerialCard* card = GetCardMgr().GetSSC();
1053 if (card && card->IsActive())
1054 enable = FALSE;
1055 EnableWindow(GetDlgItem(hWnd, IDC_SERIALPORT), enable);
1056 break;
1057 }
1058
1059 default:
1060 return FALSE;
1061 }
1062
1063 return TRUE;
1064}
1065
1066void CPageSlots::ConfigResetSSC(UINT slot)
1067{

Callers 1

DlgProcSSCMethod · 0.80

Calls 3

FillComboBoxMethod · 0.80
GetSSCMethod · 0.80
IsActiveMethod · 0.80

Tested by

no test coverage detected