⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windowslogon.hpp

📁 一个WinCE6。0下的IP phone的源代码
💻 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 __WINDOWSLOGON_HPP__
#define __WINDOWSLOGON_HPP__

#include <windows.h>
#include <regext.h>
#include <DialogControl.hpp>
#include <Controls.hpp>
#include <PaintHelper.hpp>
#include <LogoScreen.hpp>
#include "Resource.h"

__declspec(selectany) UINT c_LogonControls[] =
{
    IDC_CRED_DOMAIN,
    IDC_CRED_PASSWORD,
    IDC_CRED_USERNAME,
    IDC_TEXT_CREDDOMAIN,
    IDC_TEXT_CREDPASSWORD,
    IDC_TEXT_CREDNAME,
    IDC_TEXT_CREDHEADER,
};

class WindowsLogonDialog_t :
    public DialogControl_t<WindowsLogonDialog_t>,
    public LogoScreen_t
{
public:
    WindowsLogonDialog_t();
    ~WindowsLogonDialog_t();

    //WndClassName
    static
    const WCHAR*
    GetWindowClassName(
        void
        );

    HRESULT 
    CreateDialogScreen(
        );

    HWND GetDialog();

    BOOL 
    DialogWindowProc(
        UINT Message,
        WPARAM wParam,
        LPARAM lParam,
        bool& Handled
        );

private:
    HRESULT 
    DrawTextOnScreen(
        HDC,
        __in const RECT* pUpdateRect
        );

    HRESULT    
    OnInitDialog(
        void
        );

    LRESULT 
    OnCommand(
        WORD CommandId,
        WORD NotifyCode,
        HWND Control
        );

    HRESULT 
    InitializeEditControls(
        void
        ); 

    LRESULT
    OnOK(
        void
        ); 

    HRESULT
    ValidateCredentials(
        const WCHAR*    c_pDomain, 
        const WCHAR*    c_pUserName, 
        const WCHAR*    c_pPassword
        ); 

    VOID
    OnKeyDown(
        int Keycode
        );
    
    VOID
    UpdateMenuBar(
        void
        ); 

    bool
    ShouldShowOKButton(
        void
        ); 

    static
    HRESULT
    WriteCredentials(
        const WCHAR*    c_pDomain, 
        const WCHAR*    c_pUserName, 
        const WCHAR*    c_pPassword
        ); 

    HRESULT 
    OnHelp(
        void                        
        );

    void
    OnSettingsChange(
        WPARAM wParam
        );
    
private:
    Edit_t          m_UserNameEdit;
    Edit_t          m_PasswordEdit;
    Edit_t          m_DomainEdit;
    MenuBar_t       m_MenuBar; 

    HWND            m_ErrorDialog;
    HWND            m_HelpDialog;
    HWND            m_Control;

    int             m_OriginalLowestYValue;
    int             m_LowestYValue;
    BOOL            m_InputPanelStatus;
};


#endif // !defined __WINDOWSLOGON_HPP__



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -