/* Licensed to Stichting The Commons Conservancy (TCC) under one or more * contributor license agreements. See the AUTHORS file distributed with * this work for additional information regarding copyright ownership. * TCC licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "pch.h" #include "Redwax SignText (MFC).h" #include "afxdialogex.h" #include "SignPage.h" #include "Redwax SignText (MFC)Dlg.h" // SignPage dialog IMPLEMENT_DYNAMIC(SignPage, CDialogEx) SignPage::SignPage(CWnd* pParent /*=nullptr*/) : CDialogEx(IDD_SIGN_PAGE, pParent) { } SignPage::SignPage(SignTextInstance* instance, CWnd* pParent /*=nullptr*/) : CDialogEx(IDD_SIGN_PAGE, pParent) { this->instance = instance; } SignPage::~SignPage() { } void SignPage::DoDataExchange(CDataExchange* pDX) { CDialogEx::DoDataExchange(pDX); DDX_Control(pDX, IDC_SIGNTEXT, m_signText); DDX_Control(pDX, IDC_CERTIFICATEBOX, m_certificateBox); DDX_Control(pDX, IDC_PINTEXT, m_pinText); } BEGIN_MESSAGE_MAP(SignPage, CDialogEx) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_CBN_SELCHANGE(IDC_CERTIFICATEBOX, &SignPage::OnCbnSelchangeCertificatebox) ON_COMMAND(IDOK, &SignPage::OnIdok) END_MESSAGE_MAP() // SignPage message handlers void SignPage::OnCbnSelchangeCertificatebox() { ::PostMessage(instance->signtext->hwnd, WM_CRYPTO_SELECTED, 0, 0); } void SignPage::OnIdok() { /* ignore the enter button */ }