mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 20:11:35 -06:00
4.20
This commit is contained in:
committed by
Kornel Lesiński
parent
8c1b5c7b7e
commit
3c510ba80b
@@ -4,8 +4,6 @@
|
||||
#include "MessagesDialog.h"
|
||||
#include "Windows/ResourceString.h"
|
||||
|
||||
// #include "../resource.h"
|
||||
|
||||
#ifdef LANG
|
||||
#include "../../LangUtils.h"
|
||||
#endif
|
||||
@@ -19,7 +17,7 @@ static CIDLangPair kIDLangPairs[] =
|
||||
};
|
||||
#endif
|
||||
|
||||
void CMessagesDialog::AddMessage(LPCTSTR aMessage)
|
||||
void CMessagesDialog::AddMessageDirect(LPCTSTR message)
|
||||
{
|
||||
int itemIndex = _messageList.GetItemCount();
|
||||
LVITEM item;
|
||||
@@ -36,11 +34,25 @@ void CMessagesDialog::AddMessage(LPCTSTR aMessage)
|
||||
_messageList.InsertItem(&item);
|
||||
|
||||
item.mask = LVIF_TEXT;
|
||||
item.pszText = (LPTSTR)aMessage;
|
||||
item.pszText = (LPTSTR)message;
|
||||
item.iSubItem = 1;
|
||||
_messageList.SetItem(&item);
|
||||
}
|
||||
|
||||
void CMessagesDialog::AddMessage(LPCTSTR message)
|
||||
{
|
||||
CSysString s = message;
|
||||
while (!s.IsEmpty())
|
||||
{
|
||||
int pos = s.Find(TEXT('\n'));
|
||||
if (pos < 0)
|
||||
break;
|
||||
AddMessageDirect(s.Left(pos));
|
||||
s.Delete(0, pos + 1);
|
||||
}
|
||||
AddMessageDirect(s);
|
||||
}
|
||||
|
||||
bool CMessagesDialog::OnInit()
|
||||
{
|
||||
#ifdef LANG
|
||||
@@ -73,8 +85,8 @@ bool CMessagesDialog::OnInit()
|
||||
|
||||
_messageList.InsertColumn(1, &columnInfo);
|
||||
|
||||
for(int i = 0; i < _messages->Size(); i++)
|
||||
AddMessage((*_messages)[i]);
|
||||
for(int i = 0; i < Messages->Size(); i++)
|
||||
AddMessage((*Messages)[i]);
|
||||
|
||||
/*
|
||||
if(_messageList.GetItemCount() > 0)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// MessagesDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __MESSAGESDIALOG_H
|
||||
#define __MESSAGESDIALOG_H
|
||||
|
||||
@@ -13,10 +11,11 @@
|
||||
class CMessagesDialog: public NWindows::NControl::CModalDialog
|
||||
{
|
||||
NWindows::NControl::CListView _messageList;
|
||||
void AddMessage(LPCTSTR string);
|
||||
void AddMessageDirect(LPCTSTR message);
|
||||
void AddMessage(LPCTSTR message);
|
||||
virtual bool OnInit();
|
||||
public:
|
||||
const CSysStringVector *_messages;
|
||||
const CSysStringVector *Messages;
|
||||
INT_PTR Create(HWND parentWindow = 0)
|
||||
{ return CModalDialog::Create(MAKEINTRESOURCE(IDD_DIALOG_MESSAGES), parentWindow); }
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Used by resource.rc
|
||||
//
|
||||
|
||||
#define IDS_MESSAGES_DIALOG_MESSAGE_COLUMN 11
|
||||
#define IDS_MESSAGES_DIALOG_MESSAGE_COLUMN 503
|
||||
|
||||
#define IDD_DIALOG_MESSAGES 503
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 157
|
||||
#define _APS_NEXT_RESOURCE_VALUE 657
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1002
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
|
||||
@@ -84,7 +84,6 @@ END
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
|
||||
IDD_DIALOG_MESSAGES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
@@ -92,8 +91,9 @@ BEGIN
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 128
|
||||
END
|
||||
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -105,9 +105,6 @@ BEGIN
|
||||
IDS_MESSAGES_DIALOG_MESSAGE_COLUMN "Message"
|
||||
END
|
||||
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user