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

Method OnInitDialog

WinArk/ProcessThreadDlg.cpp:11–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9}
10
11LRESULT CThreadDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) {
12 BarDesc bars[] = {
13 {12,"�߳�״̬",0},
14 {15,"�߳�Id",0},
15 {15,"��������Id",0},
16 {20,"������",0},
17 {20,"CPUTime",0},
18 {30,"CreateTime",0},
19 {10,"Priority",0},
20 {10,"BasePriority",0},
21 {20,"Teb",0},
22 {20,"WaitReason",0},
23 {20,"StartAddress",0},
24 {30,"Win32StartAddress",0},
25 {20,"StackBase",0},
26 {20,"StackLimit",0},
27 {30,"ContextSwitch",0},
28 {25,"KernelTime",0},
29 {25,"UserTime",0},
30 {10,"IoPriority",0},
31 {5,"MemoryPriority",0},
32 {30,"ComFlags",0},
33 {30,"ComApartment",0},
34 {25,"WaitTime",0},
35 {260,"�����",0}
36 };
37
38 TableInfo table = {
39 1,1,TABLE_SORTMENU | TABLE_COPYMENU | TABLE_APPMENU,9,0,0,0
40 };
41
42 BarInfo info;
43 info.nbar = _countof(bars);
44 info.font = 9;
45 for (int i = 0; i < info.nbar; i++) {
46 info.bar[i].defdx = bars[i].defdx;
47 info.bar[i].mode = bars[i].mode;
48 info.bar[i].name = bars[i].name;
49 }
50
51 DWORD pid = static_cast<DWORD>(lParam);
52 m_ProcThreadTable = new CProcessThreadTable(info, table, pid);
53 WCHAR proc[25];
54 _itow(pid, proc, 10);
55 std::wstring title = L"Process: pid = ";
56 title += proc;
57 SetWindowText(title.c_str());
58 RECT rect;
59 GetClientRect(&rect);
60 m_ProcThreadTable->Create(m_hWnd, rect, nullptr, WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_BORDER | WS_EX_LAYERED);
61 int iHorizontalUnit = LOWORD(GetDialogBaseUnits());
62 int iVerticalUnit = HIWORD(GetDialogBaseUnits());
63 int width, height;
64 height = rect.bottom - rect.top - 3 * iHorizontalUnit;
65 width = rect.right - rect.left - 2 * iHorizontalUnit;
66 ::MoveWindow(m_ProcThreadTable->m_hWnd, iHorizontalUnit, iVerticalUnit, width, height, false);
67 m_ProcThreadTable->ShowWindow(SW_SHOW);
68 return TRUE;

Callers

nothing calls this directly

Calls 1

CreateMethod · 0.45

Tested by

no test coverage detected