mirror of
https://github.com/BeneficialCode/WinArk
synced 2026-08-09 12:00:31 +00:00
63 lines
2.1 KiB
C++
63 lines
2.1 KiB
C++
#include "stdafx.h"
|
|
#include "resource.h"
|
|
#include "KernelRoutineDlg.h"
|
|
|
|
LRESULT CKernelRoutineDlg::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
|
|
EndDialog(0);
|
|
return TRUE;
|
|
}
|
|
|
|
LRESULT CKernelRoutineDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) {
|
|
BarDesc bars[] = {
|
|
{12,"Code",0},
|
|
{36,"Ãû³Æ",0},
|
|
{18,"º¯ÊýµØÖ·",0},
|
|
{260,"Ä¿±êÄ£¿é",0},
|
|
};
|
|
|
|
TableInfo table = {
|
|
1,1,TABLE_SORTMENU | TABLE_COPYMENU | TABLE_APPMENU,9,0,0,0
|
|
};
|
|
|
|
BarInfo info;
|
|
info.nbar = _countof(bars);
|
|
info.font = 9;
|
|
for (int i = 0; i < info.nbar; i++) {
|
|
info.bar[i].defdx = bars[i].defdx;
|
|
info.bar[i].mode = bars[i].mode;
|
|
info.bar[i].name = bars[i].name;
|
|
}
|
|
|
|
wchar_t* name = reinterpret_cast<wchar_t*>(lParam);
|
|
|
|
m_DispatchRoutineTable = new CDispatchRoutinesTable(info, table, name);
|
|
RECT rect;
|
|
GetClientRect(&rect);
|
|
m_DispatchRoutineTable->Create(m_hWnd, rect, nullptr, WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_BORDER | WS_EX_LAYERED);
|
|
int iHorizontalUnit = LOWORD(GetDialogBaseUnits());
|
|
int iVerticalUnit = HIWORD(GetDialogBaseUnits());
|
|
int width, height;
|
|
height = rect.bottom - rect.top - 3 * iHorizontalUnit;
|
|
width = rect.right - rect.left - 2 * iHorizontalUnit;
|
|
::MoveWindow(m_DispatchRoutineTable->m_hWnd, iHorizontalUnit, iVerticalUnit, width, height, false);
|
|
m_DispatchRoutineTable->ShowWindow(SW_SHOW);
|
|
return TRUE;
|
|
}
|
|
|
|
LRESULT CKernelRoutineDlg::OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
|
|
RECT rect;
|
|
GetClientRect(&rect);
|
|
int iHorizontalUnit = LOWORD(GetDialogBaseUnits());
|
|
int iVerticalUnit = HIWORD(GetDialogBaseUnits());
|
|
int width, height;
|
|
height = rect.bottom - rect.top - 3 * iHorizontalUnit;
|
|
width = rect.right - rect.left - 2 * iHorizontalUnit;
|
|
::MoveWindow(m_DispatchRoutineTable->m_hWnd, iHorizontalUnit, iVerticalUnit, width, height, false);
|
|
RedrawWindow(nullptr, nullptr, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN);
|
|
return TRUE;
|
|
}
|
|
|
|
void CKernelRoutineDlg::OnGetMinMaxInfo(LPMINMAXINFO lpMMI) {
|
|
lpMMI->ptMinTrackSize.x = 350;
|
|
lpMMI->ptMinTrackSize.y = 150;
|
|
} |