MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / OnInitDialog

Method OnInitDialog

WinArk/SystemConfigDlg.cpp:9–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using namespace WinSys;
8
9LRESULT CSystemConfigDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
10 m_CheckImageLoad.Attach(GetDlgItem(IDC_INTERCEPT_DRIVER));
11
12 m_BasicSysInfo = SystemInformation::GetBasicSystemInfo();
13
14 GetDlgItem(IDC_REMOVE_CALLBACK).EnableWindow(FALSE);
15
16 CString text;
17 auto& ver = SystemInformation::GetWindowsVersion();
18
19 text.Format(L"%u.%u.%u", ver.Major, ver.Minor, ver.Build);
20 SetDlgItemText(IDC_WIN_VERSION, text);
21
22 text = FormatHelper::TimeToString(SystemInformation::GetBootTime());
23 SetDlgItemText(IDC_BOOT_TIME, text);
24
25 text = FormatHelper::FormatWithCommas(m_BasicSysInfo.TotalPhysicalInPages >> 8) + L" MB";
26 text.Format(L"%s (%u GB)", text, (ULONG)((m_BasicSysInfo.TotalPhysicalInPages + (1 << 17)) >> 18));
27 SetDlgItemText(IDC_USABLE_RAM, text);
28
29 SetDlgItemInt(IDC_PROCESSOR_COUNT, m_BasicSysInfo.NumberOfProcessors);
30
31 std::string brand = SystemInformation::GetCpuBrand();
32 SetDlgItemTextA(m_hWnd,IDC_PROCESSOR, brand.c_str());
33
34 return TRUE;
35}
36
37LRESULT CSystemConfigDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
38 bool enable = GetDlgItem(IDC_SET_CALLBACK).IsWindowEnabled();

Callers

nothing calls this directly

Calls 2

GetBootTimeFunction · 0.85
AttachMethod · 0.45

Tested by

no test coverage detected