📄 setpin.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.
//
#pragma once
#ifndef __SETPIN_HPP__
#define __SETPIN_HPP__
#include <windows.h>
#include <regext.h>
#include <DialogControl.hpp>
#include <Controls.hpp>
#include <PaintHelper.hpp>
#include <LogoScreen.hpp>
const UINT c_cSetPINEditControls = 3;
const UINT c_PINLength = 4;
class SetPINDialog_t :
public DialogControl_t<SetPINDialog_t>,
public LogoScreen_t
{
public:
SetPINDialog_t();
~SetPINDialog_t();
//WndClassName
static
const WCHAR*
GetWindowClassName(
void
);
HRESULT
CreateDialogScreen(
);
HWND GetDialog();
BOOL
DialogWindowProc(
UINT Message,
WPARAM wParam,
LPARAM lParam,
bool& Handled
);
private:
HRESULT
OnInitDialog(
void
);
LRESULT
OnCommand(
WORD CommandId,
WORD NotifyCode,
HWND Control
);
HRESULT
InitializeEditControls(
void
);
VOID
OnKeyDown(
int Keycode
);
VOID
UpdateMenuBar(
void
);
HRESULT
OnDoneClick(
void
);
HRESULT
OnHelp(
void
);
private:
Edit_t m_rgEdit[c_cSetPINEditControls];
MenuBar_t m_MenuBar;
HWND m_ErrorDialog;
HWND m_HelpDialog;
HWND m_Control;
WCHAR m_OldPIN[c_PINLength + 1];
bool m_ToLockPhone;
static const UINT sc_idxOldPIN;
static const UINT sc_idxNewPIN;
static const UINT sc_idxConfirm;
};
#endif // !defined __SETPIN_HPP__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -