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

Method OnInitDialog

WinArk/ProcessInlineHookDlg.cpp:9–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

GetBitnessMethod · 0.80
CreateMethod · 0.45

Tested by

no test coverage detected