4.44 beta

This commit is contained in:
Igor Pavlov
2007-01-20 00:00:00 +00:00
committed by Kornel Lesiński
parent 804edc5756
commit d9666cf046
1331 changed files with 10535 additions and 13791 deletions

View File

@@ -0,0 +1,50 @@
// PasswordDialog.cpp
#include "StdAfx.h"
#include "PasswordDialog.h"
#ifdef LANG
#include "../../LangUtils.h"
#endif
#ifdef LANG
static CIDLangPair kIDLangPairs[] =
{
{ IDC_STATIC_PASSWORD_HEADER, 0x02000B01 },
{ IDC_CHECK_PASSWORD_SHOW, 0x02000B02 },
};
#endif
bool CPasswordDialog::OnInit()
{
#ifdef LANG
LangSetWindowText(HWND(*this), 0x02000B00);
LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
#endif
_passwordControl.Attach(GetItem(IDC_EDIT_PASSWORD));
_passwordControl.SetText(Password);
_passwordControl.SetPasswordChar(TEXT('*'));
return CModalDialog::OnInit();
}
bool CPasswordDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
{
if (buttonID == IDC_CHECK_PASSWORD_SHOW)
{
_passwordControl.SetPasswordChar((IsButtonChecked(
IDC_CHECK_PASSWORD_SHOW) == BST_CHECKED) ? 0: TEXT('*'));
UString password;
_passwordControl.GetText(password);
_passwordControl.SetText(password);
return true;
}
return CDialog::OnButtonClicked(buttonID, buttonHWND);
}
void CPasswordDialog::OnOK()
{
_passwordControl.GetText(Password);
CModalDialog::OnOK();
}

View File

@@ -0,0 +1,21 @@
// PasswordDialog.h
#ifndef __PASSWORDDIALOG_H
#define __PASSWORDDIALOG_H
#include "Windows/Control/Dialog.h"
#include "Windows/Control/Edit.h"
#include "resource.h"
class CPasswordDialog: public NWindows::NControl::CModalDialog
{
NWindows::NControl::CEdit _passwordControl;
virtual void OnOK();
virtual bool OnInit();
virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
public:
UString Password;
INT_PTR Create(HWND parentWindow = 0) { return CModalDialog::Create(IDD_DIALOG_PASSWORD, parentWindow); }
};
#endif

View File

@@ -0,0 +1,16 @@
// stdafx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#define _WIN32_WINNT 0x0400
// it's for Windows NT supporting (MENUITEMINFOW)
#define WINVER 0x0400
#include <windows.h>
#include <commctrl.h>
#include "Common/NewHandler.h"
#endif

View File

@@ -0,0 +1,4 @@
#define IDD_DIALOG_PASSWORD 501
#define IDC_STATIC_PASSWORD_HEADER 1000
#define IDC_EDIT_PASSWORD 1001
#define IDC_CHECK_PASSWORD_SHOW 1002

View File

@@ -0,0 +1,26 @@
#include "resource.h"
#include "../../../GuiCommon.rc"
#define xSize2 172
#define ySize2 68
#define xSize (xSize2 + marg + marg)
#define ySize (ySize2 + marg + marg)
#define bYPos (ySize - marg - bYSize)
#define b1XPos (xSize - marg - bXSize)
#define b2XPos (b1XPos - 10 - bXSize)
IDD_DIALOG_PASSWORD DIALOG 0, 0, xSize, ySize MY_MODAL_DIALOG_STYLE
CAPTION "Enter password"
MY_FONT
BEGIN
LTEXT "&Enter password:", IDC_STATIC_PASSWORD_HEADER, marg, marg, xSize2, 8
EDITTEXT IDC_EDIT_PASSWORD, marg , 19, xSize2, 14, ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "&Show password", IDC_CHECK_PASSWORD_SHOW, "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
marg, 41, xSize2, 10
DEFPUSHBUTTON "OK", IDOK, b2XPos, bYPos, bXSize, bYSize
PUSHBUTTON "Cancel", IDCANCEL, b1XPos, bYPos, bXSize, bYSize
END