Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions src/UUPAssistant/AppDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using namespace std;
using namespace Lourdle::UIFramework;

AppDlg::AppDlg(WindowBase* Parent, SessionContext& ctx)
: DialogEx2(Parent, GetFontSize() * 60, GetFontSize() * 35, WS_CAPTION | WS_SYSMENU | DS_FIXEDSYS | DS_MODALFRAME, GetString(String_InstallApps)),
: DialogEx2(Parent, GetFontSize() * 60, GetFontSize() * 35, WS_CAPTION | WS_SYSMENU | DS_FIXEDSYS | DS_MODALFRAME | WS_SIZEBOX, GetString(String_InstallApps)),
ctx(ctx), Browse(this, &AppDlg::BrowseFiles), ViewAppxFeatures(this, &AppDlg::ViewFeatures),
Remove(this, &AppDlg::RemoveItems), Add(this, &AppDlg::AddFiles), InstallEdge(this, 0, ButtonStyle::AutoCheckbox),
AppList(this, 0, WS_CHILD | WS_VISIBLE | WS_BORDER | LVS_SINGLESEL), Path(this, 0), hRemoveOptionMenu(CreatePopupMenu())
Expand Down Expand Up @@ -214,12 +214,14 @@ struct AppxFeatureDlg : DialogEx2<AppDlg>
bool bPreventCheck = false;

void Init();
void OnSize(BYTE type, int nClientWidth, int nClientHeight, WindowBatchPositioner wbp);
void OnGetMinMaxInfo(PMINMAXINFO pMinMaxInfo);
bool OnClose();
void OnDraw(HDC hdc, RECT rect);
LRESULT OnNotify(LPNMHDR pnmhdr);
};

AppxFeatureDlg::AppxFeatureDlg(AppDlg* Parent) : DialogEx2(Parent, GetFontSize() * 40, GetFontSize() * 40, WS_CAPTION | WS_BORDER | WS_SYSMENU | DS_FIXEDSYS | DS_MODALFRAME, GetString(String_ViewAppxFeatures)),
AppxFeatureDlg::AppxFeatureDlg(AppDlg* Parent) : DialogEx2(Parent, GetFontSize() * 40, GetFontSize() * 40, WS_CAPTION | WS_BORDER | WS_SYSMENU | DS_FIXEDSYS | DS_MODALFRAME | WS_SIZEBOX, GetString(String_ViewAppxFeatures)),
bPreventCheck(!Parent->Remove.IsWindowEnabled()), AppxFeatureList(this, 0, WS_CHILD | WS_VISIBLE | WS_BORDER | LVS_SINGLESEL), StubOption(this, 0, !Parent->Remove.IsWindowEnabled() ? ButtonStyle::Checkbox : ButtonStyle::AutoCheckbox)
{
}
Expand All @@ -241,13 +243,8 @@ void AppxFeatureDlg::Init()
AppxFeatureList.SetCheckState(index, true);
}

AppxFeatureList.MoveWindow(pxUnit * 2, pxUnit * 5, pxUnit * 36, pxUnit * 31);

StubOption.SetWindowText(GetString(String_StubOptionInstallFull));
StubOption.SetCheck(GetParent()->ctx.bStubOptionInstallFull);
SIZE size;
StubOption.GetIdealSize(&size);
StubOption.MoveWindow(pxUnit * 39 - size.cx, pxUnit * 38 - size.cy / 2, size.cx, size.cy);

String TipText = GetString(String_StubOptionTip);
TTTOOLINFOW ti = {
Expand All @@ -261,6 +258,21 @@ void AppxFeatureDlg::Init()
StubOptionTip.SetMaxTipWidth(pxUnit * 30);
}

void AppxFeatureDlg::OnSize(BYTE, int nClientWidth, int nClientHeight, WindowBatchPositioner wbp)
{
int pxUnit = GetFontSize();
wbp.MoveWindow(AppxFeatureList, pxUnit * 2, pxUnit * 5, nClientWidth - pxUnit * 4, nClientHeight - pxUnit * 9);
SIZE size;
StubOption.GetIdealSize(&size);
wbp.MoveWindow(StubOption, nClientWidth - pxUnit - size.cx, nClientHeight - pxUnit * 2 - size.cy / 2, size.cx, size.cy);
}

void AppxFeatureDlg::OnGetMinMaxInfo(PMINMAXINFO pMinMaxInfo)
{
pMinMaxInfo->ptMinTrackSize.x = GetFontSize() * 40;
pMinMaxInfo->ptMinTrackSize.y = GetFontSize() * 40;
}

void AppxFeatureDlg::OnDraw(HDC hdc, RECT rect)
{
rect.left = GetFontSize();
Expand Down Expand Up @@ -400,23 +412,32 @@ void AppDlg::Init()
Remove.SetWindowText(GetString(String_Remove));
ViewAppxFeatures.SetWindowText(GetString(String_ViewAppxFeatures));
InstallEdge.SetWindowText(GetString(String_InstallEdge));
}

void AppDlg::OnSize(BYTE, int nClientWidth, int nClientHeight, WindowBatchPositioner wbp)
{
int pxUnit = GetFontSize();
wbp.MoveWindow(AppList, pxUnit, pxUnit, nClientWidth - pxUnit * 2, nClientHeight - pxUnit * 15);
wbp.MoveWindow(ViewAppxFeatures, pxUnit, nClientHeight - pxUnit * 13, pxUnit * 12, pxUnit * 2);
wbp.MoveWindow(Remove, nClientWidth - pxUnit * 6, nClientHeight - pxUnit * 13, pxUnit * 5, pxUnit * 2);
wbp.MoveWindow(Path, pxUnit, nClientHeight - pxUnit * 6, nClientWidth - pxUnit * 8, pxUnit * 2);
wbp.MoveWindow(Browse, nClientWidth - pxUnit * 6, nClientHeight - pxUnit * 6, pxUnit * 5, pxUnit * 2);
wbp.MoveWindow(Add, pxUnit, nClientHeight - pxUnit * 3, pxUnit * 5, pxUnit * 2);
SIZE size;
InstallEdge.GetIdealSize(&size);
InstallEdge.MoveWindow(pxUnit * 59 - size.cx, pxUnit * 33 - size.cy / 2, size.cx, size.cy);
AppList.MoveWindow(pxUnit, pxUnit, pxUnit * 58, pxUnit * 20);
Path.MoveWindow(pxUnit, pxUnit * 29, pxUnit * 52, pxUnit * 2);
Browse.MoveWindow(pxUnit * 54, pxUnit * 29, pxUnit * 5, pxUnit * 2);
Add.MoveWindow(pxUnit, pxUnit * 32, pxUnit * 5, pxUnit * 2);
Remove.MoveWindow(pxUnit * 54, pxUnit * 22, pxUnit * 5, pxUnit * 2);
ViewAppxFeatures.MoveWindow(pxUnit, pxUnit * 22, pxUnit * 12, pxUnit * 2);
wbp.MoveWindow(InstallEdge, nClientWidth - pxUnit - size.cx, nClientHeight - pxUnit * 2 - size.cy / 2, size.cx, size.cy);
}

void AppDlg::OnGetMinMaxInfo(PMINMAXINFO pMinMaxInfo)
{
pMinMaxInfo->ptMinTrackSize.x = GetFontSize() * 60;
pMinMaxInfo->ptMinTrackSize.y = GetFontSize() * 35;
}

void AppDlg::OnDraw(HDC hdc, RECT rect)
{
rect.left = GetFontSize();
rect.top = rect.left * 25;
rect.top = rect.bottom - rect.left * 10;
rect.right -= rect.left;

int n = 0;
Expand Down
87 changes: 65 additions & 22 deletions src/UUPAssistant/DriverDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Constants;

constexpr int BaseDpi = 96;

DriverDlg::DriverDlg(WindowBase* Parent, SessionContext& ctx) : DialogEx2(Parent, GetFontSize() * 60, GetFontSize() * 49, WS_CAPTION | WS_BORDER | WS_SYSMENU | DS_FIXEDSYS | DS_MODALFRAME | WS_CLIPCHILDREN, GetString(String_AddDrivers)),
DriverDlg::DriverDlg(WindowBase* Parent, SessionContext& ctx) : DialogEx2(Parent, GetFontSize() * 60, GetFontSize() * 49, WS_CAPTION | WS_BORDER | WS_SYSMENU | DS_FIXEDSYS | DS_MODALFRAME | WS_CLIPCHILDREN | WS_SIZEBOX, GetString(String_AddDrivers)),
ctx(ctx), DriverList(this, 0, WS_CHILD | WS_BORDER | WS_VISIBLE | LVS_SINGLESEL), BrowseDir(this, &DriverDlg::Browse), Path(this, 0), BrowseFiles(this, &DriverDlg::FileBrowse),
Recurse(this, 0, ButtonStyle::AutoCheckbox), ForceUnsigned(this, 0, ButtonStyle::AutoCheckbox), AddDriverFromInstalledOS(this, &DriverDlg::ScanInstalledDrivers),
Add(this, &DriverDlg::AddItems), Remove(this, &DriverDlg::PopMenu), hRemoveOptionMenu(CreatePopupMenu())
Expand Down Expand Up @@ -66,29 +66,40 @@ void DriverDlg::Init()
AddDriverFromInstalledOS.SetWindowText(GetString(String_AddDriverFromInstalledOS));
ForceUnsigned.SetCheck(ctx.bForceUnsigned);
Recurse.SetCheck(BST_CHECKED);
CenterWindow(Parent);
}
Comment on lines 66 to +70

void DriverDlg::OnSize(BYTE, int nClientWidth, int nClientHeight, WindowBatchPositioner wbp)
{
int pxUnit = GetFontSize();
DriverList.MoveWindow(pxUnit, pxUnit, pxUnit * 58, pxUnit * 30);
Remove.MoveWindow(pxUnit, pxUnit * 32, pxUnit * 5, pxUnit * 2);
AddDriverFromInstalledOS.MoveWindow(pxUnit * 47, pxUnit * 32, pxUnit * 12, pxUnit * 2);
wbp.MoveWindow(DriverList, pxUnit, pxUnit, nClientWidth - pxUnit * 2, nClientHeight - pxUnit * 19);
wbp.MoveWindow(Remove, pxUnit, nClientHeight - pxUnit * 17, pxUnit * 5, pxUnit * 2);
wbp.MoveWindow(AddDriverFromInstalledOS, nClientWidth - pxUnit * 13, nClientHeight - pxUnit * 17, pxUnit * 12, pxUnit * 2);
SIZE size;
ForceUnsigned.GetIdealSize(&size);
ForceUnsigned.MoveWindow(pxUnit, pxUnit * 35, size.cx, size.cy);
wbp.MoveWindow(ForceUnsigned, pxUnit, nClientHeight - pxUnit * 14, size.cx, size.cy);
int nForceUnsignedHeight = size.cy;
Recurse.GetIdealSize(&size);
Recurse.MoveWindow(pxUnit, pxUnit * 35 + size.cy, size.cx, size.cy);
Path.MoveWindow(pxUnit, pxUnit * 43, pxUnit * 50, pxUnit * 2);
BrowseDir.MoveWindow(pxUnit * 52, pxUnit * 43, pxUnit * 7, pxUnit * 2);
BrowseFiles.MoveWindow(pxUnit * 54, pxUnit * 46, pxUnit * 5, pxUnit * 2);
Add.MoveWindow(pxUnit, pxUnit * 46, pxUnit * 5, pxUnit * 2);
Ring->MoveWindow(pxUnit * 7, pxUnit * 46, pxUnit * 2, pxUnit * 2);
CenterWindow(Parent);
wbp.MoveWindow(Recurse, pxUnit, nClientHeight - pxUnit * 14 + nForceUnsignedHeight, size.cx, size.cy);
wbp.MoveWindow(Path, pxUnit, nClientHeight - pxUnit * 6, nClientWidth - pxUnit * 10, pxUnit * 2);
wbp.MoveWindow(BrowseDir, nClientWidth - pxUnit * 8, nClientHeight - pxUnit * 6, pxUnit * 7, pxUnit * 2);
wbp.MoveWindow(BrowseFiles, nClientWidth - pxUnit * 6, nClientHeight - pxUnit * 3, pxUnit * 5, pxUnit * 2);
wbp.MoveWindow(Add, pxUnit, nClientHeight - pxUnit * 3, pxUnit * 5, pxUnit * 2);
if (Ring)
wbp.MoveWindow(*Ring, pxUnit * 7, nClientHeight - pxUnit * 3, pxUnit * 2, pxUnit * 2);
}

void DriverDlg::OnGetMinMaxInfo(PMINMAXINFO pMinMaxInfo)
{
pMinMaxInfo->ptMinTrackSize.x = GetFontSize() * 60;
pMinMaxInfo->ptMinTrackSize.y = GetFontSize() * 49;
}

void DriverDlg::OnDraw(HDC hdc, RECT rect)
{
rect.left = GetFontSize();
rect.right -= rect.left;
rect.bottom = static_cast<LONG>(rect.left * 42.5);
rect.bottom -= static_cast<LONG>(rect.left * 6.5);

DrawText(hdc,
ResStrFormat(String_AddDrv, DriverList.GetItemCount()),
Expand Down Expand Up @@ -892,9 +903,9 @@ void DriverDlg::ScanInstalledDrivers()

std::vector<Driver> InstalledDrivers;

ScanDrivers(DriverDlg* Parent) : DialogEx2(Parent, GetFontSize() * 30, GetFontSize() * 40, WS_CAPTION | WS_BORDER | WS_SYSMENU | DS_FIXEDSYS | DS_MODALFRAME, GetString(String_AddDrivers)),
ScanDrivers(DriverDlg* Parent) : DialogEx2(Parent, GetFontSize() * 30, GetFontSize() * 40, WS_CAPTION | WS_BORDER | WS_SYSMENU | DS_FIXEDSYS | DS_MODALFRAME | WS_SIZEBOX, GetString(String_AddDrivers)),
Drivers(this), Add(this, &ScanDrivers::AddDrivers, ButtonStyle::SplitButton), SelectAll(this, &ScanDrivers::SelectAllClicked), SelectInvert(this, &ScanDrivers::SelectInvertClicked),
Export(this, &ScanDrivers::ExportDrivers), DriverDetail(this, 0, DWORD(WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_READONLY | ES_AUTOVSCROLL)), hAddMenu(CreatePopupMenu())
Export(this, &ScanDrivers::ExportDrivers), DriverDetail(this, 0, DWORD(WS_CHILD | ES_MULTILINE | ES_READONLY | ES_AUTOVSCROLL)), hAddMenu(CreatePopupMenu())
{
WORD id = Random();
AppendMenuW(hAddMenu, 0, id, GetString(String_ExportToTempDirAndAdd));
Expand Down Expand Up @@ -1009,8 +1020,9 @@ void DriverDlg::ScanInstalledDrivers()

Ring.reset();

Drivers.MoveWindow(GetFontSize(), GetFontSize(), GetFontSize() * 28, GetFontSize() * 24);
DriverDetail.MoveWindow(GetFontSize(), GetFontSize() * 26, GetFontSize() * 28, GetFontSize() * 10);
Drivers.ShowWindow(SW_SHOW);
DriverDetail.ShowWindow(SW_SHOW);

Add.EnableWindow(true);
SelectAll.EnableWindow(true);
SelectInvert.EnableWindow(true);
Expand Down Expand Up @@ -1050,6 +1062,10 @@ void DriverDlg::ScanInstalledDrivers()
List.reset();
Ring->MoveWindow(GetFontSize() * 13, GetFontSize() * 14, GetFontSize() * 4, GetFontSize() * 4);
Ring->Start();
Add.ShowWindow(SW_SHOW);
SelectAll.ShowWindow(SW_SHOW);
SelectInvert.ShowWindow(SW_SHOW);
Export.ShowWindow(SW_SHOW);
Scan(pPath->c_str());
Invalidate();
}
Expand All @@ -1068,6 +1084,12 @@ void DriverDlg::ScanInstalledDrivers()
SelectInvert.SetWindowText(GetString(String_SelectInvert));
Export.SetWindowText(GetString(String_Export));

Add.ShowWindow(SW_HIDE);
SelectAll.ShowWindow(SW_HIDE);
SelectInvert.ShowWindow(SW_HIDE);
Export.ShowWindow(SW_HIDE);
Drivers.ShowWindow(SW_HIDE);

List = std::make_unique<SystemList>(this, GetFontSize(), GetFontSize() * 5, GetFontSize() * 28, GetFontSize() * 33);
Ring = std::make_unique<ProgressRing>(this, true);

Expand Down Expand Up @@ -1097,17 +1119,38 @@ void DriverDlg::ScanInstalledDrivers()
CenterWindow(Parent);
}

void OnSize(BYTE, int nClientWidth, int nClientHeight, WindowBatchPositioner wbp)
{
int pxUnit = GetFontSize();
wbp.MoveWindow(Drivers, pxUnit, pxUnit, nClientWidth - pxUnit * 2, nClientHeight - pxUnit * 16);
wbp.MoveWindow(DriverDetail, pxUnit, nClientHeight - pxUnit * 14, nClientWidth - pxUnit * 2, pxUnit * 10);
wbp.MoveWindow(SelectAll, pxUnit, nClientHeight - pxUnit * 3, pxUnit * 5, pxUnit * 2);
wbp.MoveWindow(SelectInvert, pxUnit * 7, nClientHeight - pxUnit * 3, pxUnit * 5, pxUnit * 2);
wbp.MoveWindow(Export, pxUnit * 13, nClientHeight - pxUnit * 3, pxUnit * 5, pxUnit * 2);
wbp.MoveWindow(Add, nClientWidth - pxUnit * 7, nClientHeight - pxUnit * 3, pxUnit * 6, pxUnit * 2);
if (List)
{
RECT rect;
GetClientRect(&rect);
wbp.MoveWindow(*List, pxUnit, pxUnit * 5, rect.right - pxUnit * 2, rect.bottom - pxUnit * 7);
}
if (Ring && Ring->IsWindowVisible())
wbp.MoveWindow(*Ring, nClientWidth / 2 - pxUnit * 2, nClientHeight / 2 - pxUnit * 2, pxUnit * 4, pxUnit * 4);
}

void OnGetMinMaxInfo(PMINMAXINFO pMinMaxInfo)
{
pMinMaxInfo->ptMinTrackSize.x = GetFontSize() * 30;
pMinMaxInfo->ptMinTrackSize.y = GetFontSize() * 40;
}

void Scan(PCWSTR pszImagePath)
{
Add.EnableWindow(false);
SelectAll.EnableWindow(false);
SelectInvert.EnableWindow(false);
Export.EnableWindow(false);
Add.MoveWindow(GetFontSize() * 23, GetFontSize() * 37, GetFontSize() * 6, GetFontSize() * 2);
SelectAll.MoveWindow(GetFontSize(), GetFontSize() * 37, GetFontSize() * 5, GetFontSize() * 2);
SelectInvert.MoveWindow(GetFontSize() * 7, GetFontSize() * 37, GetFontSize() * 5, GetFontSize() * 2);
Export.MoveWindow(GetFontSize() * 13, GetFontSize() * 37, GetFontSize() * 5, GetFontSize() * 2);


PROCESS_INFORMATION pi;
STARTUPINFOW si = { sizeof(si) };
WCHAR szPath[MAX_PATH];
Expand Down
6 changes: 6 additions & 0 deletions src/UUPAssistant/UUPAssistant.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ struct AppDlg : Lourdle::UIFramework::DialogEx2<Lourdle::UIFramework::WindowBase
void RemoveItems();
void ViewFeatures();
void OnDraw(HDC, RECT);
void OnSize(BYTE type, int nClientWidth, int nClientHeight, Lourdle::UIFramework::WindowBatchPositioner wbp);
void OnGetMinMaxInfo(PMINMAXINFO pMinMaxInfo);

void Init();

Expand Down Expand Up @@ -179,6 +181,8 @@ struct UpdateDlg : Lourdle::UIFramework::DialogEx2<Lourdle::UIFramework::WindowB

void Init();
void OnDraw(HDC, RECT);
void OnSize(BYTE type, int nClientWidth, int nClientHeight, Lourdle::UIFramework::WindowBatchPositioner wbp);
void OnGetMinMaxInfo(PMINMAXINFO pMinMaxInfo);
LRESULT OnNotify(LPNMHDR);

void RemoveItem();
Expand Down Expand Up @@ -226,6 +230,8 @@ struct DriverDlg : Lourdle::UIFramework::DialogEx2<Lourdle::UIFramework::WindowB

void Init();
void OnDraw(HDC, RECT);
void OnSize(BYTE type, int nClientWidth, int nClientHeight, Lourdle::UIFramework::WindowBatchPositioner wbp);
void OnGetMinMaxInfo(PMINMAXINFO pMinMaxInfo);
bool OnClose();
void OnDestroy();

Expand Down
47 changes: 29 additions & 18 deletions src/UUPAssistant/UpdateDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void SetPSFDlg::BrowseFile()
return;
}

UpdateDlg::UpdateDlg(WindowBase* Parent, SessionContext& ctx) : DialogEx2(Parent, GetFontSize(nullptr) * 45, GetFontSize(nullptr) * 50, WS_CAPTION | WS_SYSMENU | WS_BORDER | DS_MODALFRAME | DS_FIXEDSYS, GetString(String_InstallUpdates)),
UpdateDlg::UpdateDlg(WindowBase* Parent, SessionContext& ctx) : DialogEx2(Parent, GetFontSize(nullptr) * 45, GetFontSize(nullptr) * 50, WS_CAPTION | WS_SYSMENU | WS_BORDER | DS_MODALFRAME | DS_FIXEDSYS | WS_SIZEBOX, GetString(String_InstallUpdates)),
UpdateList(this, 0, WS_CHILD | WS_VISIBLE | WS_BORDER | LVS_SINGLESEL), Remove(this, &UpdateDlg::RemoveItem, ButtonStyle::Text),
Path(this, 0), hItemMenu(CreatePopupMenu()), hRemoveMenu(CreatePopupMenu()), FinalPath(this, 0, DWORD(WS_VISIBLE | WS_CHILD | ES_MULTILINE)),
Browse(this, &UpdateDlg::BrowseFiles, ButtonStyle::Text), BrowseDir(this, &UpdateDlg::BrowseDirectory, ButtonStyle::Text),
Expand Down Expand Up @@ -151,20 +151,6 @@ void UpdateDlg::Init()
ViewOtherUpdates.SetWindowText(GetString(String_ViewOtherUpdates));
CleanComponents.SetWindowText(GetString(String_CleanComponents));

UpdateList.MoveWindow(pxUnit, pxUnit, pxUnit * 43, pxUnit * 20);
Remove.MoveWindow(pxUnit, pxUnit * 22, pxUnit * 5, pxUnit * 2);

FinalPath.MoveWindow(pxUnit, pxUnit * 25, pxUnit * 33, pxUnit * 9);
Path.MoveWindow(pxUnit * 1, pxUnit * 44, pxUnit * 43, pxUnit * 2);
Browse.MoveWindow(pxUnit * 31, pxUnit * 47, pxUnit * 5, pxUnit * 2);
BrowseDir.MoveWindow(pxUnit * 37, pxUnit * 47, pxUnit * 7, pxUnit * 2);
Add.MoveWindow(pxUnit * 1, pxUnit * 47, pxUnit * 5, pxUnit * 2);
if (!ctx.SetupUpdate.Empty() || !ctx.SafeOSUpdate.Empty())
ViewOtherUpdates.MoveWindow(pxUnit * 7, pxUnit * 22, pxUnit * 8, pxUnit * 2);

SIZE size;
CleanComponents.GetIdealSize(&size);
CleanComponents.MoveWindow(pxUnit * 44 - size.cx, pxUnit * 23 - size.cy / 2, size.cx, size.cy);

for (int i = 0; i != ctx.UpdateVector.size(); ++i)
{
Expand All @@ -182,12 +168,37 @@ void UpdateDlg::Init()
CleanComponents.SetCheck(ctx.bCleanComponentStore ? BST_CHECKED : BST_UNCHECKED);
}

void UpdateDlg::OnSize(BYTE, int nClientWidth, int nClientHeight, WindowBatchPositioner wbp)
{
int pxUnit = GetFontSize();
wbp.MoveWindow(UpdateList, pxUnit, pxUnit, nClientWidth - pxUnit * 2, nClientHeight - pxUnit * 30);
wbp.MoveWindow(Remove, pxUnit, nClientHeight - pxUnit * 28, pxUnit * 5, pxUnit * 2);
if (!ctx.SetupUpdate.Empty() || !ctx.SafeOSUpdate.Empty() || !ctx.EnablementPackage.Empty())
wbp.MoveWindow(ViewOtherUpdates, pxUnit * 7, nClientHeight - pxUnit * 28, pxUnit * 8, pxUnit * 2);
else
wbp.MoveWindow(ViewOtherUpdates, 0, 0, 0, 0);
wbp.MoveWindow(FinalPath, pxUnit, nClientHeight - pxUnit * 25, nClientWidth - pxUnit * 12, pxUnit * 9);
SIZE size;
CleanComponents.GetIdealSize(&size);
wbp.MoveWindow(CleanComponents, nClientWidth - pxUnit - size.cx, nClientHeight - pxUnit * 27 - size.cy / 2, size.cx, size.cy);
wbp.MoveWindow(Path, pxUnit, nClientHeight - pxUnit * 6, nClientWidth - pxUnit * 2, pxUnit * 2);
wbp.MoveWindow(Browse, nClientWidth - pxUnit * 14, nClientHeight - pxUnit * 3, pxUnit * 5, pxUnit * 2);
wbp.MoveWindow(BrowseDir, nClientWidth - pxUnit * 8, nClientHeight - pxUnit * 3, pxUnit * 7, pxUnit * 2);
wbp.MoveWindow(Add, pxUnit, nClientHeight - pxUnit * 3, pxUnit * 5, pxUnit * 2);
}

void UpdateDlg::OnGetMinMaxInfo(PMINMAXINFO pMinMaxInfo)
{
pMinMaxInfo->ptMinTrackSize.x = GetFontSize(nullptr) * 45;
pMinMaxInfo->ptMinTrackSize.y = GetFontSize(nullptr) * 50;
}

void UpdateDlg::OnDraw(HDC hdc, RECT rect)
{
rect.top = GetFontSize(nullptr) * 35;
rect.left = rect.top / 35;
rect.left = GetFontSize(nullptr);
rect.top = rect.bottom - rect.left * 15;
rect.right -= rect.left;
rect.bottom = rect.left * 43;
rect.bottom -= rect.left * 7;
DrawText(hdc, ResStrFormat(String_AddUpdates, ctx.UpdateVector.size()), -1, &rect, DT_WORDBREAK | DT_BOTTOM);
}

Expand Down
Loading