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

Method OnInitDialog

WinArk/KernelRoutineDlg.cpp:10–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8}
9
10LRESULT CKernelRoutineDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) {
11 BarDesc bars[] = {
12 {12,"Code",0},
13 {36,"����",0},
14 {18,"������ַ",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 wchar_t* name = reinterpret_cast<wchar_t*>(lParam);
32
33 m_DispatchRoutineTable = new CDispatchRoutinesTable(info, table, name);
34 RECT rect;
35 GetClientRect(&rect);
36 m_DispatchRoutineTable->Create(m_hWnd, rect, nullptr, WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_BORDER | WS_EX_LAYERED);
37 int iHorizontalUnit = LOWORD(GetDialogBaseUnits());
38 int iVerticalUnit = HIWORD(GetDialogBaseUnits());
39 int width, height;
40 height = rect.bottom - rect.top - 3 * iHorizontalUnit;
41 width = rect.right - rect.left - 2 * iHorizontalUnit;
42 ::MoveWindow(m_DispatchRoutineTable->m_hWnd, iHorizontalUnit, iVerticalUnit, width, height, false);
43 m_DispatchRoutineTable->ShowWindow(SW_SHOW);
44 return TRUE;
45}
46
47LRESULT CKernelRoutineDlg::OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
48 RECT rect;

Callers

nothing calls this directly

Calls 1

CreateMethod · 0.45

Tested by

no test coverage detected