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

Method DlgProcInternal

source/Configuration/PageConfig.cpp:63–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63INT_PTR CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
64{
65 switch (message)
66 {
67 case WM_NOTIFY:
68 {
69 // Property Sheet notifications
70
71 switch (((LPPSHNOTIFY)lparam)->hdr.code)
72 {
73 case PSN_SETACTIVE:
74 // About to become the active page
75 m_PropertySheetHelper.SetLastPage(m_Page);
76 InitOptions(hWnd);
77 break;
78 case PSN_KILLACTIVE:
79 // About to stop being active page
80 {
81 uint32_t NewComputerMenuItem = (uint32_t) SendDlgItemMessage(hWnd, IDC_COMPUTER, CB_GETCURSEL, 0, 0);
82 SetWindowLongPtr(hWnd, DWLP_MSGRESULT, FALSE); // Changes are valid
83 }
84 break;
85 case PSN_APPLY:
86 DlgOK(hWnd);
87 SetWindowLongPtr(hWnd, DWLP_MSGRESULT, PSNRET_NOERROR); // Changes are valid
88 break;
89 case PSN_QUERYCANCEL:
90 // Can use this to ask user to confirm cancel
91 break;
92 case PSN_RESET:
93 DlgCANCEL(hWnd);
94 break;
95 }
96 }
97 break;
98
99 case WM_COMMAND:
100 switch (LOWORD(wparam))
101 {
102 case IDC_AUTHENTIC_SPEED: // Authentic Machine Speed
103 SendDlgItemMessage(hWnd, IDC_SLIDER_CPU_SPEED, TBM_SETPOS, TRUE, SPEED_NORMAL);
104 EnableTrackbar(hWnd, FALSE);
105 break;
106
107 case IDC_CUSTOM_SPEED: // Select Custom Speed
108 SetFocus(GetDlgItem(hWnd, IDC_SLIDER_CPU_SPEED));
109 EnableTrackbar(hWnd, TRUE);
110 break;
111
112 case IDC_MONOCOLOR:
113 {
114 CHOOSECOLOR cc;
115 memset(&cc, 0, sizeof(CHOOSECOLOR));
116 cc.lStructSize = sizeof(CHOOSECOLOR);
117 cc.hwndOwner = GetFrame().g_hFrameWindow;
118 cc.rgbResult = m_PropertySheetHelper.GetConfigNew().m_monochromeRGB;
119 cc.lpCustColors = m_customColors + 1;
120 cc.Flags = CC_RGBINIT | CC_SOLIDCOLOR;

Callers 1

DlgProcMethod · 0.45

Calls 7

GetApple2TypeFunction · 0.85
ProbeMainCpuDefaultFunction · 0.85
IsApple2OriginalFunction · 0.85
IsApple2PlusOrCloneFunction · 0.85
SetLastPageMethod · 0.80
IsOkToResetConfigMethod · 0.80
ResetAllToDefaultMethod · 0.80

Tested by

no test coverage detected