Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[292622]: OptionsUsername.cpp Maximize Restore History

Download this file

OptionsUsername.cpp    81 lines (65 with data), 2.0 kB

 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
// OptionsUsername.cpp : implementation file
//
#include "stdafx.h"
#include "passwordsafe.h"
#include "PwsPlatform.h"
#if defined(POCKET_PC)
#include "pocketpc/resource.h"
#else
#include "resource.h"
#endif
#include "OptionsUsername.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COptionsUsername property page
IMPLEMENT_DYNCREATE(COptionsUsername, CPropertyPage)
COptionsUsername::COptionsUsername() : CPropertyPage(COptionsUsername::IDD)
{
//{{AFX_DATA_INIT(COptionsUsername)
//}}AFX_DATA_INIT
}
COptionsUsername::~COptionsUsername()
{
}
void COptionsUsername::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(COptionsUsername)
DDX_Check(pDX, IDC_USEDEFUSER, m_usedefuser);
DDX_Check(pDX, IDC_QUERYSETDEF, m_querysetdef);
DDX_Text(pDX, IDC_DEFUSERNAME, m_defusername);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(COptionsUsername, CPropertyPage)
//{{AFX_MSG_MAP(COptionsUsername)
ON_BN_CLICKED(IDC_USEDEFUSER, OnUsedefuser)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// COptionsUsername message handlers
void COptionsUsername::OnUsedefuser()
{
if (((CButton*)GetDlgItem(IDC_USEDEFUSER))->GetCheck() == 1)
{
GetDlgItem(IDC_DEFUSERNAME)->EnableWindow(TRUE);
GetDlgItem(IDC_STATIC_USERNAME)->EnableWindow(TRUE);
GetDlgItem(IDC_QUERYSETDEF)->EnableWindow(FALSE);
}
else
{
GetDlgItem(IDC_DEFUSERNAME)->EnableWindow(FALSE);
GetDlgItem(IDC_STATIC_USERNAME)->EnableWindow(FALSE);
GetDlgItem(IDC_QUERYSETDEF)->EnableWindow(TRUE);
}
}
BOOL COptionsUsername::OnInitDialog()
{
CPropertyPage::OnInitDialog();
OnUsedefuser();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}