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

📄 layout.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 __LAYOUT_HPP__
#define __LAYOUT_HPP__

#include <windows.h>

class Layout_t
{
public:
    static
    HRESULT
    InitializeRCData(
        void
        );

    #define DECLARE_METRIC(MetricName) \
        static int MetricName()

    #define DECLARE_SIZE(MetricName) \
        static int MetricName##Width(); \
        static int MetricName##Height()

    DECLARE_SIZE(SpeedDialMargin);           
    DECLARE_METRIC(SpeedDialHeight);           
    DECLARE_METRIC(SpeedDialIndexLeftOffset);  
    DECLARE_METRIC(SpeedDialIndexWidth);       
    DECLARE_METRIC(SpeedDialListLabelWidth);   

    DECLARE_SIZE(FreeBusyMargin);            
    DECLARE_METRIC(TentativeBmpWidth);         
    DECLARE_METRIC(FreeBusyItemHeight);        
    DECLARE_METRIC(FreeBusyGraphicsHeight);    
    DECLARE_METRIC(FreeBusyGraphicsYOffset);   
    DECLARE_METRIC(FreeBusyStatusYOffset);     
    DECLARE_METRIC(FreeBusyClockYOffset);      
    DECLARE_METRIC(FreeBusyCallRecordExtraHeight);
    DECLARE_METRIC(FreeBusyCallRecordExtraOffset);

    DECLARE_SIZE(CallRecordMargin);  
    DECLARE_METRIC(CallRecordHeight);  

    DECLARE_SIZE(LabeledInfoDisplayMargin);  
    DECLARE_METRIC(LabeledInfoDisplayDataWidth);  

private:

    struct Size_t
    {
        short m_Width; 
        short m_Height; 
    }; 

    struct MetricsRCData_t
    {
        Size_t  m_SpeedDialMargin;           //SpeedDialDisplayItem: margin
        short   m_SpeedDialHeight;           //SpeedDialDisplayItem: item height
        short   m_SpeedDialIndexLeftOffset;  //SpeedDialDisplayItem: "index" left offset
        short   m_SpeedDialIndexWidth;       //SpeedDialDisplayItem: "index" total width
        short   m_SpeedDialListLabelWidth;   //SpeedDialList LabeledEditDisplayItem: width for each label

        Size_t  m_FreeBusyMargin;            //FreeBusyDisplayItem: Text margin
        short   m_TentativeBmpWidth;         //FreeBusyDisplayItem: "Tentative" bitmap width
        short   m_FreeBusyItemHeight;        //FreeBusyDisplayItem: Item Height
        short   m_FreeBusyGraphicsHeight;    //FreeBusyDisplayItem: Graphics total height
        short   m_FreeBusyGraphicsYOffset;   //FreeBusyDisplayItem: Graphics Y offset from top
        short   m_FreeBusyStatusYOffset;     //FreeBusyDisplayItem: StatusText Y offset from top
        short   m_FreeBusyClockYOffset;      //FreeBusyDisplayItem: Clock Y Offset from top
        short   m_FreeBusyCallRecordExtraHeight; //FreeBusyCallRecordDisplayItem: Extra height
        short   m_FreeBusyCallRecordExtraOffset; //FreeBusyCallRecordDisplayItem: CallRecord Y Offset from previous

        Size_t  m_CallRecordMargin;  //CallRecordDisplayItem: margin
        short   m_CallRecordHeight;  //CallRecordDisplayItem: height

        Size_t  m_LabeledInfoDisplayMargin;     //LabeledInfoDisplayItem: margin
        short   m_LabeledInfoDisplayDataWidth;  //LabeledInfoDisplayItem: Data width
    };

    static const MetricsRCData_t* s_pMetrics;
};

class Colors_t
{
public:
    static
    HRESULT
    InitializeRCData(
        void
        );

    #define DECLARE_COLOR(ColorName) \
        static int ColorName()

    DECLARE_COLOR(FreeBusy_Free);
    DECLARE_COLOR(FreeBusy_Busy);
    DECLARE_COLOR(FreeBusy_OOF);
    DECLARE_COLOR(FreeBusy_Unknown);
    DECLARE_COLOR(FreeBusy_Background);
    DECLARE_COLOR(FreeBusy_NowLine);
    DECLARE_COLOR(FreeBusy_TextColor);
    DECLARE_COLOR(FreeBusy_GraphicsOutline);

private:
    struct ColorsRCData_t
    {
        int m_FreeBusy_Free; 
        int m_FreeBusy_Busy;
        int m_FreeBusy_OOF;
        int m_FreeBusy_Unknown;
        int m_FreeBusy_Background;
        int m_FreeBusy_NowLine;
        int m_FreeBusy_TextColor;
        int m_FreeBusy_GraphicsOutline;
    };

    static const ColorsRCData_t* s_pColors;
};

#endif // !defined __LAYOUT_HPP__

⌨️ 快捷键说明

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