make the Enter a Comment edit box default to disabled so people are less inclined to enter useless comments
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
#include "smpackage.h"
|
#include "smpackage.h"
|
||||||
#include "EnterComment.h"
|
#include "EnterComment.h"
|
||||||
#include "archutils/Win32/DialogUtil.h"
|
#include "archutils/Win32/DialogUtil.h"
|
||||||
|
#include ".\entercomment.h"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define new DEBUG_NEW
|
#define new DEBUG_NEW
|
||||||
@@ -21,6 +22,7 @@ static char THIS_FILE[] = __FILE__;
|
|||||||
EnterComment::EnterComment(CWnd* pParent /*=NULL*/)
|
EnterComment::EnterComment(CWnd* pParent /*=NULL*/)
|
||||||
: CDialog(EnterComment::IDD, pParent)
|
: CDialog(EnterComment::IDD, pParent)
|
||||||
, m_bDontAsk(FALSE)
|
, m_bDontAsk(FALSE)
|
||||||
|
, m_bShowAComment(FALSE)
|
||||||
{
|
{
|
||||||
//{{AFX_DATA_INIT(EnterComment)
|
//{{AFX_DATA_INIT(EnterComment)
|
||||||
// NOTE: the ClassWizard will add member initialization here
|
// NOTE: the ClassWizard will add member initialization here
|
||||||
@@ -35,6 +37,7 @@ void EnterComment::DoDataExchange(CDataExchange* pDX)
|
|||||||
DDX_Control(pDX, IDC_EDIT, m_edit);
|
DDX_Control(pDX, IDC_EDIT, m_edit);
|
||||||
//}}AFX_DATA_MAP
|
//}}AFX_DATA_MAP
|
||||||
DDX_Check(pDX, IDC_DONTASK, m_bDontAsk);
|
DDX_Check(pDX, IDC_DONTASK, m_bDontAsk);
|
||||||
|
DDX_Check(pDX, IDC_SHOW_A_COMMENT, m_bShowAComment);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL EnterComment::OnInitDialog()
|
BOOL EnterComment::OnInitDialog()
|
||||||
@@ -44,6 +47,8 @@ BOOL EnterComment::OnInitDialog()
|
|||||||
// TODO: Add extra initialization here
|
// TODO: Add extra initialization here
|
||||||
DialogUtil::LocalizeDialogAndContents( *this );
|
DialogUtil::LocalizeDialogAndContents( *this );
|
||||||
|
|
||||||
|
OnBnClickedShowAComment();
|
||||||
|
|
||||||
return TRUE; // return TRUE unless you set the focus to a control
|
return TRUE; // return TRUE unless you set the focus to a control
|
||||||
// EXCEPTION: OCX Property Pages should return FALSE
|
// EXCEPTION: OCX Property Pages should return FALSE
|
||||||
}
|
}
|
||||||
@@ -51,6 +56,7 @@ BOOL EnterComment::OnInitDialog()
|
|||||||
BEGIN_MESSAGE_MAP(EnterComment, CDialog)
|
BEGIN_MESSAGE_MAP(EnterComment, CDialog)
|
||||||
//{{AFX_MSG_MAP(EnterComment)
|
//{{AFX_MSG_MAP(EnterComment)
|
||||||
//}}AFX_MSG_MAP
|
//}}AFX_MSG_MAP
|
||||||
|
ON_BN_CLICKED(IDC_SHOW_A_COMMENT, OnBnClickedShowAComment)
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -60,11 +66,22 @@ void EnterComment::OnOK()
|
|||||||
{
|
{
|
||||||
// TODO: Add extra validation here
|
// TODO: Add extra validation here
|
||||||
|
|
||||||
|
UpdateData( TRUE );
|
||||||
|
|
||||||
|
if( m_bShowAComment )
|
||||||
m_edit.GetWindowText( m_sEnteredComment );
|
m_edit.GetWindowText( m_sEnteredComment );
|
||||||
|
|
||||||
CDialog::OnOK();
|
CDialog::OnOK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EnterComment::OnBnClickedShowAComment()
|
||||||
|
{
|
||||||
|
UpdateData( TRUE );
|
||||||
|
|
||||||
|
// TODO: Add your control notification handler code here
|
||||||
|
GetDlgItem( IDC_EDIT )->EnableWindow( m_bShowAComment );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2002-2005 Chris Danford
|
* (c) 2002-2005 Chris Danford
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ protected:
|
|||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
public:
|
public:
|
||||||
BOOL m_bDontAsk;
|
BOOL m_bDontAsk;
|
||||||
|
BOOL m_bShowAComment;
|
||||||
|
afx_msg void OnBnClickedShowAComment();
|
||||||
};
|
};
|
||||||
|
|
||||||
//{{AFX_INSERT_LOCATION}}
|
//{{AFX_INSERT_LOCATION}}
|
||||||
|
|||||||
@@ -90,6 +90,7 @@
|
|||||||
#define IDC_STATIC_MESSAGE2 1068
|
#define IDC_STATIC_MESSAGE2 1068
|
||||||
#define IDC_STATIC_MESSAGE1 1069
|
#define IDC_STATIC_MESSAGE1 1069
|
||||||
#define IDC_STATIC_ICON 1070
|
#define IDC_STATIC_ICON 1070
|
||||||
|
#define IDC_SHOW_A_COMMENT 1071
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
@@ -97,7 +98,7 @@
|
|||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 155
|
#define _APS_NEXT_RESOURCE_VALUE 155
|
||||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1071
|
#define _APS_NEXT_CONTROL_VALUE 1072
|
||||||
#define _APS_NEXT_SYMED_VALUE 104
|
#define _APS_NEXT_SYMED_VALUE 104
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -205,18 +205,21 @@ BEGIN
|
|||||||
WS_EX_TRANSPARENT
|
WS_EX_TRANSPARENT
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_ENTER_COMMENT DIALOGEX 0, 0, 312, 202
|
IDD_ENTER_COMMENT DIALOGEX 0, 0, 324, 203
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Add A Comment"
|
CAPTION "Add A Comment"
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "This message will be displayed before a user installs your package.",
|
LTEXT "You can add a message will be displayed before a user installs your package.",
|
||||||
-1,7,7,219,12
|
IDC_STATIC,7,7,252,18
|
||||||
EDITTEXT IDC_EDIT,17,24,232,155,ES_MULTILINE | ES_AUTOHSCROLL
|
CONTROL "Show a comment",IDC_SHOW_A_COMMENT,"Button",
|
||||||
DEFPUSHBUTTON "OK",IDOK,255,7,50,14
|
BS_AUTOCHECKBOX | WS_TABSTOP,19,39,185,12
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,255,24,50,14
|
EDITTEXT IDC_EDIT,17,53,232,123,ES_MULTILINE | ES_AUTOHSCROLL
|
||||||
CONTROL "Don't display this dialog in the future",IDC_DONTASK,
|
CONTROL "Don't display this dialog in the future",IDC_DONTASK,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,181,145,11
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,185,145,11
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,267,7,50,14
|
||||||
|
PUSHBUTTON "Cancel",IDCANCEL,267,24,50,14
|
||||||
|
GROUPBOX "Package Comment",IDC_STATIC,7,29,252,152
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_SHOW_COMMENT DIALOGEX 0, 0, 246, 186
|
IDD_SHOW_COMMENT DIALOGEX 0, 0, 246, 186
|
||||||
@@ -419,9 +422,9 @@ BEGIN
|
|||||||
IDD_ENTER_COMMENT, DIALOG
|
IDD_ENTER_COMMENT, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 305
|
RIGHTMARGIN, 317
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 195
|
BOTTOMMARGIN, 196
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_SHOW_COMMENT, DIALOG
|
IDD_SHOW_COMMENT, DIALOG
|
||||||
|
|||||||
Reference in New Issue
Block a user