Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/UI/FileManager/MessagesDialog.cpp')
-rwxr-xr-xCPP/7zip/UI/FileManager/MessagesDialog.cpp39
1 files changed, 28 insertions, 11 deletions
diff --git a/CPP/7zip/UI/FileManager/MessagesDialog.cpp b/CPP/7zip/UI/FileManager/MessagesDialog.cpp
index 201c0bae..3d73ade1 100755
--- a/CPP/7zip/UI/FileManager/MessagesDialog.cpp
+++ b/CPP/7zip/UI/FileManager/MessagesDialog.cpp
@@ -1,11 +1,13 @@
// MessagesDialog.cpp
#include "StdAfx.h"
-#include "MessagesDialog.h"
-#include "Common/StringConvert.h"
+
#include "Common/IntToString.h"
+
#include "Windows/ResourceString.h"
+#include "MessagesDialog.h"
+
#ifdef LANG
#include "LangUtils.h"
#endif
@@ -49,9 +51,12 @@ bool CMessagesDialog::OnInit()
LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
#endif
_messageList.Attach(GetItem(IDC_MESSAGE_LIST));
+
+ #ifndef UNDER_CE
_messageList.SetUnicodeFormat(true);
+ #endif
- _messageList.InsertColumn(0, L"#", 30);
+ _messageList.InsertColumn(0, L"", 30);
const UString s =
#ifdef LANG
@@ -62,15 +67,27 @@ bool CMessagesDialog::OnInit()
_messageList.InsertColumn(1, s, 600);
- for(int i = 0; i < Messages->Size(); i++)
+ for (int i = 0; i < Messages->Size(); i++)
AddMessage((*Messages)[i]);
- /*
- if(_messageList.GetItemCount() > 0)
- {
- UINT aState = LVIS_SELECTED | LVIS_FOCUSED;
- _messageList.SetItemState(0, aState, aState);
- }
- */
+ _messageList.SetColumnWidthAuto(0);
+ _messageList.SetColumnWidthAuto(1);
+ NormalizeSize();
return CModalDialog::OnInit();
}
+
+bool CMessagesDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
+{
+ int mx, my;
+ GetMargins(8, mx, my);
+ int bx, by;
+ GetItemSizes(IDOK, bx, by);
+ int y = ySize - my - by;
+ int x = xSize - mx - bx;
+
+ InvalidateRect(NULL);
+
+ MoveItem(IDOK, x, y, bx, by);
+ _messageList.Move(mx, my, xSize - mx * 2, y - my * 2);
+ return false;
+}