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

Method OnInitDialog

WinArk/ProcessHandleDlg.cpp:11–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9}
10
11LRESULT CHandleDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) {
12 BarDesc bars[] = {
13 {22,"����",0},
14 {20,"��ַ",0},
15 {25,"Name",0},
16 {20,"���ֵ",0},
17 {30,"������",0},
18 {30,"PID",0},
19 {20,"����",0},
20 {50,"Access Mask",0},
21 {50,"Decoded Access Mask",0},
22 {30,"Details",0}
23 };
24
25 TableInfo table = {
26 1,1,TABLE_SORTMENU | TABLE_COPYMENU | TABLE_APPMENU,9,0,0,0
27 };
28
29 BarInfo info;
30 info.nbar = _countof(bars);
31 info.font = 9;
32 for (int i = 0; i < info.nbar; i++) {
33 info.bar[i].defdx = bars[i].defdx;
34 info.bar[i].mode = bars[i].mode;
35 info.bar[i].name = bars[i].name;
36 }
37
38 DWORD pid = static_cast<DWORD>(lParam);
39 m_ProcHandleTable = new CProcessHandleTable(info, table, nullptr,pid);
40 WCHAR proc[25];
41 _itow(pid, proc, 10);
42 std::wstring title = L"Process: pid = ";
43 title += proc;
44 SetWindowText(title.c_str());
45 RECT rect;
46 GetClientRect(&rect);
47 m_ProcHandleTable->Create(m_hWnd, rect, nullptr, WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_BORDER | WS_EX_LAYERED);
48 int iHorizontalUnit = LOWORD(GetDialogBaseUnits());
49 int iVerticalUnit = HIWORD(GetDialogBaseUnits());
50 int width, height;
51 height = rect.bottom - rect.top - 3 * iHorizontalUnit;
52 width = rect.right - rect.left - 2 * iHorizontalUnit;
53 ::MoveWindow(m_ProcHandleTable->m_hWnd, iHorizontalUnit, iVerticalUnit, width, height, false);
54 m_ProcHandleTable->ShowWindow(SW_SHOW);
55 return TRUE;
56}
57
58LRESULT CHandleDlg::OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
59 RECT rect;

Callers

nothing calls this directly

Calls 1

CreateMethod · 0.45

Tested by

no test coverage detected