File: MessagesDialog_rc.cpp

package info (click to toggle)
p7zip 9.20.1~dfsg.1-4.1%2Bdeb8u3
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 13,368 kB
  • sloc: cpp: 104,670; ansic: 12,930; makefile: 1,899; sh: 1,031; asm: 159
file content (89 lines) | stat: -rw-r--r-- 2,492 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// MessagesDialog_rc.cpp
 
#include "StdAfx.h"

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
 
#ifdef __BORLANDC__
    #pragma hdrstop
#endif

// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
    #include "wx/wx.h"
#endif

#include <wx/listctrl.h>

#undef _WIN32

#include "Windows/Control/DialogImpl.h"
#include "MessagesDialogRes.h"

/*
IDD_DIALOG_MESSAGES DIALOG 0, 0, xSize, ySize  MY_MODAL_DIALOG_STYLE
CAPTION "7-Zip: Diagnostic messages"
MY_FONT
BEGIN
  DEFPUSHBUTTON "&Close", IDOK, bXPos, bYPos, bXSize, bYSize
  CONTROL "List1",IDC_MESSAGE_LIST,"SysListView32",
          LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 
          marg, marg, xSize2, ySize2 - bYSize - 6
END

STRINGTABLE
BEGIN
  IDS_MESSAGES_DIALOG_MESSAGE_COLUMN "Message"
END
*/

class CMessagesDialogImpl : public NWindows::NControl::CModalDialogImpl
{
  public:
   CMessagesDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent , int id) :
	CModalDialogImpl(dialog,parent, id, wxT("7-Zip: Diagnostic messages"), wxDefaultPosition, wxDefaultSize,
			   wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX)
  {
	wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);


	wxListCtrl *list = new wxListCtrl(this, IDC_MESSAGE_LIST, wxDefaultPosition, wxSize(645,195), wxLC_REPORT );

#if 0
	list->InsertColumn(0, wxT("Col1"), wxLIST_FORMAT_LEFT);
	list->InsertColumn(1, wxT("Col2"), wxLIST_FORMAT_RIGHT);
	list->InsertItem(0, wxT("#1"));
	list->SetItem(0, 1, L"message 1");
	list->InsertItem(1, wxT("#2"));
	list->SetItem(1, 1, L"message 2");
#endif
	topsizer->Add(list ,  1, wxALL|wxEXPAND, 5);


	topsizer->Add(new wxButton(this, wxID_OK, _T("&Close")) ,  0, wxALL | wxALIGN_RIGHT, 5);

	this->OnInit();

	SetSizer(topsizer); // use the sizer for layout
	topsizer->SetSizeHints(this); // set size hints to honour minimum size
  }
private:
	// Any class wishing to process wxWindows events must use this macro
	DECLARE_EVENT_TABLE()
};

static CStringTable g_stringTable[] =
{
	{ IDS_MESSAGES_DIALOG_MESSAGE_COLUMN, L"Message" },
	{ 0 , 0 }
};

REGISTER_DIALOG(IDD_DIALOG_MESSAGES,CMessagesDialog,g_stringTable)

BEGIN_EVENT_TABLE(CMessagesDialogImpl, wxDialog)
	EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton)
	EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent)
END_EVENT_TABLE()