Origial James Hoo mod to 16.04

This commit is contained in:
shunf4
2024-04-20 18:55:53 +08:00
parent 603abd5528
commit eaa3e8b48c
86 changed files with 55401 additions and 185 deletions

View File

@@ -42,6 +42,11 @@ bool CListViewDialog::OnInit()
_listView.SetColumnWidthAuto(0);
StringsWereChanged = false;
RECT rc;
GetWindowRect(&rc);
m_sizeMinWindow.cx = (RECT_SIZE_X(rc))*3/4;
m_sizeMinWindow.cy = (RECT_SIZE_Y(rc))*3/4;
NormalizeSize();
return CModalDialog::OnInit();
}
@@ -62,15 +67,15 @@ bool CListViewDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
rect.top = y - my;
InvalidateRect(&rect);
*/
InvalidateRect(NULL);
MoveItem(IDCANCEL, x, y, bx1, by);
MoveItem(IDOK, x - mx - bx2, y, bx2, by);
MoveItem(IDCANCEL, x, y, bx1, by, false);
MoveItem(IDOK, x - mx - bx2, y, bx2, by, false);
/*
if (wParam == SIZE_MAXSHOW || wParam == SIZE_MAXIMIZED || wParam == SIZE_MAXHIDE)
mx = 0;
*/
_listView.Move(mx, my, xSize - mx * 2, y - my * 2);
_listView.Move(mx, my, xSize - mx * 2, y - my * 2, false);
InvalidateRect(NULL);
return false;
}
@@ -141,3 +146,23 @@ void CListViewDialog::OnOK()
FocusedItemIndex = _listView.GetFocusedItem();
CModalDialog::OnOK();
}
bool CListViewDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_GETMINMAXINFO:
{
return OnGetMinMaxInfo((PMINMAXINFO)lParam);
}
}
return CModalDialog::OnMessage(message, wParam, lParam);
}
bool CListViewDialog::OnGetMinMaxInfo(PMINMAXINFO pMMI)
{
pMMI->ptMinTrackSize.x = m_sizeMinWindow.cx;
pMMI->ptMinTrackSize.y = m_sizeMinWindow.cy;
return false;
}