diff options
Diffstat (limited to 'CPP/7zip/UI/FileManager/CopyDialog.cpp')
-rwxr-xr-x | CPP/7zip/UI/FileManager/CopyDialog.cpp | 58 |
1 files changed, 45 insertions, 13 deletions
diff --git a/CPP/7zip/UI/FileManager/CopyDialog.cpp b/CPP/7zip/UI/FileManager/CopyDialog.cpp index 2bf60301..8cbaf41f 100755 --- a/CPP/7zip/UI/FileManager/CopyDialog.cpp +++ b/CPP/7zip/UI/FileManager/CopyDialog.cpp @@ -1,13 +1,13 @@ // CopyDialog.cpp #include "StdAfx.h" -#include "CopyDialog.h" -#include "Common/StringConvert.h" +#include "Windows/FileName.h" #include "Windows/Control/Static.h" -#include "Windows/Shell.h" -#include "Windows/FileName.h" + +#include "BrowseDialog.h" +#include "CopyDialog.h" #ifdef LANG #include "LangUtils.h" @@ -34,13 +34,53 @@ bool CCopyDialog::OnInit() NControl::CStatic staticContol; staticContol.Attach(GetItem(IDC_COPY_STATIC)); staticContol.SetText(Static); + #ifdef UNDER_CE + // we do it, since WinCE selects Value\something instead of Value !!!! + _path.AddString(Value); + #endif for (int i = 0; i < Strings.Size(); i++) _path.AddString(Strings[i]); _path.SetText(Value); SetItemText(IDC_COPY_INFO, Info); + NormalizeSize(true); return CModalDialog::OnInit(); } +bool CCopyDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) +{ + int mx, my; + GetMargins(8, mx, my); + int bx1, bx2, by; + GetItemSizes(IDCANCEL, bx1, by); + GetItemSizes(IDOK, bx2, by); + int y = ySize - my - by; + int x = xSize - mx - bx1; + + InvalidateRect(NULL); + + { + RECT rect; + GetClientRectOfItem(IDC_COPY_SET_PATH, rect); + int bx = rect.right - rect.left; + MoveItem(IDC_COPY_SET_PATH, xSize - mx - bx, rect.top, bx, rect.bottom - rect.top); + ChangeSubWindowSizeX(_path, xSize - mx - mx - bx - mx); + } + + { + RECT rect; + GetClientRectOfItem(IDC_COPY_INFO, rect); + NControl::CStatic staticContol; + staticContol.Attach(GetItem(IDC_COPY_INFO)); + int yPos = rect.top; + staticContol.Move(mx, yPos, xSize - mx * 2, y - 2 - yPos); + } + + MoveItem(IDCANCEL, x, y, bx1, by); + MoveItem(IDOK, x - mx - bx2, y, bx2, by); + + return false; +} + bool CCopyDialog::OnButtonClicked(int buttonID, HWND buttonHWND) { switch(buttonID) @@ -57,18 +97,10 @@ void CCopyDialog::OnButtonSetPath() UString currentPath; _path.GetText(currentPath); - /* - #ifdef LANG - UString title = LangLoadString(IDS_EXTRACT_SET_FOLDER, 0x02000881); - #else - UString title = MyLoadString(IDS_EXTRACT_SET_FOLDER); - #endif - */ UString title = LangStringSpec(IDS_SET_FOLDER, 0x03020209); - // UString title = L"Specify a location for output folder"; UString resultPath; - if (!NShell::BrowseForFolder(HWND(*this), title, currentPath, resultPath)) + if (!MyBrowseForFolder(HWND(*this), title, currentPath, resultPath)) return; NFile::NName::NormalizeDirPathPrefix(resultPath); _path.SetCurSel(-1); |