diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2009-08-17 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:16:00 +0300 |
commit | c99f3ebdd639c2adb03d8b44001b10af18516504 (patch) | |
tree | 92aaf34e5edbd7287c3f55037190da75ab0a8000 /CPP/7zip/UI/FileManager/MessagesDialog.cpp | |
parent | 829409452d85cd6dd9dfc9151f109d6e13a2bb1c (diff) |
9.06 beta
Diffstat (limited to 'CPP/7zip/UI/FileManager/MessagesDialog.cpp')
-rwxr-xr-x | CPP/7zip/UI/FileManager/MessagesDialog.cpp | 39 |
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; +} |