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

📄 dialogscreen.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 __DIALOGSCREEN_HPP__
#define __DIALOGSCREEN_HPP__

#include "DialogControl.hpp"
#include "Controls.hpp"
#include "PaintHelper.hpp"


class DialogScreen_t :
    public DialogControl_t<DialogScreen_t>
{
public:
    DialogScreen_t();
    ~DialogScreen_t();

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

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

private:
    inline
    LRESULT
    CallHook(
        UINT Message,
        WPARAM wParam,
        LPARAM lParam
        );

    inline
    bool
    CheckState(
        DWORD State,
        __in_opt const DWORD* pToCheckAgainst = NULL
        ) const;

    void
    GetScrollUpRect(
        RECT& ScrollUpRectangle
        );

    void
    GetScrollDownRect(
        RECT& ScrollDownRectangle
        );

    void
    GetTitleRect(
        RECT& TitleRectangle
        );

    LRESULT
    ReflectOwnerDrawMessage(
        UINT Message,
        WPARAM wParam,
        LPARAM lParam
        );

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

    LRESULT
    OnEraseBkgnd(
        HDC hdc,
        LPARAM lParam
        );

    LRESULT
    OnInitDialog(
        HWND ControlToReceiveFocus,
        __in PH_DIALOG_SCREEN_PARAMETERS* pParameters
        );

    LRESULT
    OnLButtonDown(
        UINT SystemKeys,
        short xCoordinate,
        short yCoordinate
        );

    LRESULT
    OnNotify(
        int ControlId,
        __in NMHDR* pNotificationHeader
        );

    LRESULT
    OnPaint(
        HDC hdc
        );

    LRESULT
    OnSetFocus(
        HWND OldFocus
        );

    LRESULT
    OnTimer();
    
private:
    PH_DIALOG_SCREEN_PARAMETERS*    m_pParameters; //Parameters used to create this dialog screen
    HWND                            m_Owner;
    HINSTANCE                       m_Instance;

    DIALOG_HOOK_PROC                m_pHookProc;
    void*                           m_pUserData;
    DWORD                           m_State;
    UINT                            m_TimerId;

    PaintHelper_t                   m_BackBuffer;

    bool                            m_InputPanelVisible;
};

#endif //!defined __DIALOGSCREEN_HPP__

⌨️ 快捷键说明

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