-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added plain vanilla "accept license to continue" style license dialog - Fixed memory leak in package build - Fixed behavior when clicking close on progress dlg after install
- Loading branch information
1 parent
e7faa2c
commit 121211c
Showing
16 changed files
with
240 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
Copyright © 2013-2020, Keelan Stuart (hereafter referenced as AUTHOR). All Rights Reserved. | ||
Permission to use, copy, modify, and distribute this software is hereby granted, without fee and without a signed licensing agreement, | ||
provided that the above copyright notice appears in all copies, modifications, and distributions. | ||
Furthermore, AUTHOR assumes no responsibility for any damages caused either directly or indirectly by the use of this software, nor vouches for | ||
any fitness of purpose of this software. | ||
All other copyrighted material contained herein is noted and rights attributed to individual copyright holders. | ||
For inquiries, contact: [email protected] | ||
*/ | ||
|
||
|
||
#include "stdafx.h" | ||
#include "sfx.h" | ||
#include "LicenseAcceptanceDlg.h" | ||
#include "afxdialogex.h" | ||
|
||
|
||
// CLicenseAcceptanceDlg dialog | ||
|
||
IMPLEMENT_DYNAMIC(CLicenseAcceptanceDlg, CDialog) | ||
|
||
CLicenseAcceptanceDlg::CLicenseAcceptanceDlg(const TCHAR *description, CWnd *pParent) | ||
: CDialog(IDD, pParent) | ||
{ | ||
m_hIcon = AfxGetApp()->LoadIcon(_T("ICON")); | ||
|
||
m_Desc = description; | ||
} | ||
|
||
CLicenseAcceptanceDlg::~CLicenseAcceptanceDlg() | ||
{ | ||
} | ||
|
||
void CLicenseAcceptanceDlg::DoDataExchange(CDataExchange* pDX) | ||
{ | ||
CDialog::DoDataExchange(pDX); | ||
} | ||
|
||
|
||
BEGIN_MESSAGE_MAP(CLicenseAcceptanceDlg, CDialog) | ||
ON_BN_CLICKED(IDC_CHECK_ACCEPTLICENSE, &CLicenseAcceptanceDlg::OnBnClickedCheckAcceptlicense) | ||
END_MESSAGE_MAP() | ||
|
||
|
||
// CLicenseAcceptanceDlg message handlers | ||
|
||
|
||
void CLicenseAcceptanceDlg::OnCancel() | ||
{ | ||
CDialog::OnCancel(); | ||
} | ||
|
||
|
||
BOOL CLicenseAcceptanceDlg::OnInitDialog() | ||
{ | ||
CDialog::OnInitDialog(); | ||
|
||
SetIcon(m_hIcon, TRUE); // Set big icon | ||
SetIcon(m_hIcon, FALSE); // Set small icon | ||
|
||
m_CtlOk.SubclassDlgItem(IDOK, this); | ||
|
||
if (m_CtlDesc.CreateFromStatic(IDC_BROWSER, this)) | ||
{ | ||
m_CtlDesc.LoadFromResource(_T("license")); | ||
} | ||
|
||
if (m_CtlAcceptCB.SubclassDlgItem(IDC_CHECK_ACCEPTLICENSE, this)) | ||
{ | ||
m_CtlOk.EnableWindow(false); | ||
} | ||
|
||
ShowWindow(SW_SHOWNORMAL); | ||
|
||
return FALSE; // return TRUE unless you set the focus to a control | ||
// EXCEPTION: OCX Property Pages should return FALSE | ||
} | ||
|
||
|
||
void CLicenseAcceptanceDlg::OnBnClickedCheckAcceptlicense() | ||
{ | ||
m_CtlOk.EnableWindow((m_CtlAcceptCB.GetCheck() > 0) ? TRUE : FALSE); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
Copyright © 2013-2020, Keelan Stuart (hereafter referenced as AUTHOR). All Rights Reserved. | ||
Permission to use, copy, modify, and distribute this software is hereby granted, without fee and without a signed licensing agreement, | ||
provided that the above copyright notice appears in all copies, modifications, and distributions. | ||
Furthermore, AUTHOR assumes no responsibility for any damages caused either directly or indirectly by the use of this software, nor vouches for | ||
any fitness of purpose of this software. | ||
All other copyrighted material contained herein is noted and rights attributed to individual copyright holders. | ||
For inquiries, contact: [email protected] | ||
*/ | ||
|
||
#pragma once | ||
|
||
|
||
#include "HtmlCtrl.h" | ||
|
||
// CLicenseKeyEntryDlg dialog | ||
|
||
class CLicenseAcceptanceDlg : public CDialog | ||
{ | ||
DECLARE_DYNAMIC(CLicenseAcceptanceDlg) | ||
|
||
public: | ||
CLicenseAcceptanceDlg(const TCHAR *description, CWnd *pParent = nullptr); // standard constructor | ||
virtual ~CLicenseAcceptanceDlg(); | ||
|
||
// Dialog Data | ||
enum { IDD = IDD_LICENSE_DIALOG }; | ||
|
||
protected: | ||
virtual void DoDataExchange(CDataExchange *pDX); // DDX/DDV support | ||
|
||
HICON m_hIcon; | ||
CHtmlCtrl m_CtlDesc; | ||
CButton m_CtlAcceptCB; | ||
CButton m_CtlOk; | ||
|
||
CString m_Desc; | ||
|
||
|
||
DECLARE_MESSAGE_MAP() | ||
virtual void OnCancel(); | ||
public: | ||
virtual BOOL OnInitDialog(); | ||
afx_msg void OnBnClickedCheckAcceptlicense(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.