📄 enterpin.hpp
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//
#pragma once
#ifndef __ENTERPIN_HPP__
#define __ENTERPIN_HPP__
#include <windows.h>
#include <DialogControl.hpp>
#include <PaintHelper.hpp>
#include <Controls.hpp>
#include <LogoScreen.hpp>
#include <SettingsApi.hpp>
class EnterPinDialog_t :
public DialogControl_t<EnterPinDialog_t>,
public LogoScreen_t
{
public:
EnterPinDialog_t();
~EnterPinDialog_t();
//WndClassName
static
const WCHAR*
GetWindowClassName(
void
);
BOOL
DialogWindowProc(
UINT Message,
WPARAM wParam,
LPARAM lParam,
bool& Handled
);
HRESULT
Start(
UINT NotificationMessage,
HWND NotificationWindow
);
HRESULT
SetNotificationParameters(
UINT NotificationMessage,
HWND NotificationWindow
);
BOOL
IsValid(
void
);
private:
HRESULT
OnInitDialog(
void
);
LRESULT
OnCommand(
WORD CommandId,
WORD NotifyCode,
HWND Control
);
LRESULT
OnSetNotificationParameters(
UINT NotificationMessage,
HWND NotificationWindow
);
LRESULT
OnCancelAuthRequest(
HWND hwnd
);
HRESULT
OnHelp();
void
OnBackspace();
void
OnEditUpdate();
void
CloseMessageBox();
void
ShowMessageBox(
UINT TitleId,
UINT MessageId
);
void
OnDone(
AuthenticationResult_e Result
);
private:
ce::vector<HWND> m_EditControls;
ce::wstring m_CurrentPin;
MenuBar_t m_MenuBar;
HWND m_MessageBox;
HWND m_NotificationWindow;
UINT m_NotificationMessage;
bool m_NotifiedOwner;
};
#endif // !defined __ENTERPIN_HPP__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -