mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-10 08:07:09 -06:00
3.13
This commit is contained in:
53
7zip/FileManager/Resource/ComboDialog/ComboDialog.cpp
Executable file
53
7zip/FileManager/Resource/ComboDialog/ComboDialog.cpp
Executable file
@@ -0,0 +1,53 @@
|
||||
// ComboDialog.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "ComboDialog.h"
|
||||
|
||||
#include "Windows/Control/Static.h"
|
||||
|
||||
#ifdef LANG
|
||||
#include "../../LangUtils.h"
|
||||
#endif
|
||||
|
||||
using namespace NWindows;
|
||||
|
||||
#ifdef LANG
|
||||
static CIDLangPair kIDLangPairs[] =
|
||||
{
|
||||
{ IDOK, 0x02000702 },
|
||||
{ IDCANCEL, 0x02000710 }
|
||||
};
|
||||
#endif
|
||||
|
||||
bool CComboDialog::OnInit()
|
||||
{
|
||||
#ifdef LANG
|
||||
LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
|
||||
#endif
|
||||
_comboBox.Attach(GetItem(IDC_COMBO_COMBO));
|
||||
|
||||
/*
|
||||
// why it doesn't work ?
|
||||
DWORD style = _comboBox.GetStyle();
|
||||
if (Sorted)
|
||||
style |= CBS_SORT;
|
||||
else
|
||||
style &= ~CBS_SORT;
|
||||
_comboBox.SetStyle(style);
|
||||
*/
|
||||
SetText(Title);
|
||||
|
||||
NControl::CStatic staticContol;
|
||||
staticContol.Attach(GetItem(IDC_COMBO_STATIC));
|
||||
staticContol.SetText(Static);
|
||||
_comboBox.SetText(Value);
|
||||
for(int i = 0; i < Strings.Size(); i++)
|
||||
_comboBox.AddString(Strings[i]);
|
||||
return CModalDialog::OnInit();
|
||||
}
|
||||
|
||||
void CComboDialog::OnOK()
|
||||
{
|
||||
_comboBox.GetText(Value);
|
||||
CModalDialog::OnOK();
|
||||
}
|
||||
29
7zip/FileManager/Resource/ComboDialog/ComboDialog.h
Executable file
29
7zip/FileManager/Resource/ComboDialog/ComboDialog.h
Executable file
@@ -0,0 +1,29 @@
|
||||
// ComboDialog.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __COMBODIALOG_H
|
||||
#define __COMBODIALOG_H
|
||||
|
||||
#include "Windows/Control/Dialog.h"
|
||||
#include "Windows/Control/ComboBox.h"
|
||||
#include "resource.h"
|
||||
|
||||
class CComboDialog: public NWindows::NControl::CModalDialog
|
||||
{
|
||||
NWindows::NControl::CComboBox _comboBox;
|
||||
virtual void OnOK();
|
||||
virtual bool OnInit();
|
||||
public:
|
||||
// bool Sorted;
|
||||
UString Title;
|
||||
UString Static;
|
||||
UString Value;
|
||||
CSysStringVector Strings;
|
||||
|
||||
// CComboDialog(): Sorted(false) {};
|
||||
INT_PTR Create(HWND parentWindow = 0)
|
||||
{ return CModalDialog::Create(MAKEINTRESOURCE(IDD_DIALOG_COMBO), parentWindow); }
|
||||
};
|
||||
|
||||
#endif
|
||||
21
7zip/FileManager/Resource/ComboDialog/resource.h
Executable file
21
7zip/FileManager/Resource/ComboDialog/resource.h
Executable file
@@ -0,0 +1,21 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
|
||||
#define IDD_DIALOG_COMBO 200
|
||||
|
||||
#define IDC_COMBO_STATIC 1000
|
||||
#define IDC_COMBO_COMBO 1001
|
||||
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 157
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1002
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
100
7zip/FileManager/Resource/ComboDialog/resource.rc
Executable file
100
7zip/FileManager/Resource/ComboDialog/resource.rc
Executable file
@@ -0,0 +1,100 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Russian resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(1251)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // Russian resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DIALOG_COMBO DIALOG DISCARDABLE 0, 0, 247, 71
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Combo"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
COMBOBOX IDC_COMBO_COMBO,7,20,233,65,CBS_DROPDOWN |
|
||||
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "OK",IDOK,127,50,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,190,50,50,14
|
||||
LTEXT "",IDC_COMBO_STATIC,7,7,233,8
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_DIALOG_COMBO, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 240
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 64
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user