diff options
author | Mataes <mataes2007@gmail.com> | 2018-12-29 20:26:10 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2018-12-29 20:26:10 +0300 |
commit | b2eaa2f1d902acccc554e8910eb8928852c5b25d (patch) | |
tree | 893dc3efbb279cbb0dafb7740ac12af646f485ef | |
parent | da9ecac3bd7d49c880363d16a059873191008f1b (diff) |
CrashDumper: fixed window resize
-rw-r--r-- | plugins/CrashDumper/src/ui.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index c1a81ee321..53e2ffa2e8 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -70,6 +70,8 @@ public: m_redtViewVersionInfo(this, IDC_VIEWVERSIONINFO)
{
m_flags = flags;
+ m_forceResizable = true;
+
m_btnCancel.OnClick = Callback(this, &CViewVersionInfo::OnCancelClick);
m_btnCopyClip.OnClick = Callback(this, &CViewVersionInfo::OnCopyClipClick);
m_btnCopyFile.OnClick = Callback(this, &CViewVersionInfo::OnCopyFileClick);
@@ -110,7 +112,6 @@ public: return true;
}
-
INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
if (msg == WM_GETMINMAXINFO) {
@@ -123,21 +124,23 @@ public: return CDlgBase::DlgProc(msg, wParam, lParam);
}
- int Resizer(UTILRESIZECONTROL *) override
+ int Resizer(UTILRESIZECONTROL * urc) override
{
- RECT rc;
- GetWindowRect(m_btnCopyFile.GetHwnd(), &rc);
-
- int dx, dy;
- if (MyResizeGetOffset(LOWORD(m_flags) - 20, HIWORD(m_flags) - 30 - (rc.bottom - rc.top), &dx, &dy)) {
- HDWP hDwp = BeginDeferWindowPos(4);
- hDwp = MyResizeWindow(hDwp, m_btnCopyFile.GetHwnd(), 0, dy, 0, 0);
- hDwp = MyResizeWindow(hDwp, m_btnCopyClip.GetHwnd(), dx / 2, dy, 0, 0);
- hDwp = MyResizeWindow(hDwp, m_btnCancel.GetHwnd(), dx, dy, 0, 0);
- hDwp = MyResizeWindow(hDwp, m_redtViewVersionInfo.GetHwnd(), 0, 0, dx, dy);
- EndDeferWindowPos(hDwp);
+ switch (urc->wId) {
+ case IDC_VIEWVERSIONINFO:
+ return RD_ANCHORX_WIDTH | RD_ANCHORY_HEIGHT;
+
+ case IDC_FILEVER:
+ return RD_ANCHORX_LEFT | RD_ANCHORY_BOTTOM;
+
+ case IDC_CLIPVER:
+ return RD_ANCHORX_CENTRE | RD_ANCHORY_BOTTOM;
+
+ case IDCANCEL:
+ return RD_ANCHORX_RIGHT | RD_ANCHORY_BOTTOM;
}
- return 0;
+
+ return RD_ANCHORX_LEFT | RD_ANCHORY_TOP;
}
void OnCancelClick(CCtrlBase*)
|