📄 layout.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>
#include "Common.hpp"
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_METRIC(LabeledControlLabelMarginWidth);
DECLARE_METRIC(CallRecordTextMarginHeight);
DECLARE_METRIC(MainDefaultItemHeight);
DECLARE_METRIC(TrackBarLabelWidth);
DECLARE_METRIC(SettingsLabelWidth);
DECLARE_SIZE(LabeledControlMargin);
private:
struct Size_t
{
short m_Width;
short m_Height;
};
struct MetricsRCData_t
{
short m_LabeledControlLabelMarginWidth;
short m_CallRecordTextMarginHeight;
short m_MainDefaultItemHeight;
short m_TrackBarLabelWidth;
short m_SettingsLabelWidth;
Size_t m_LabeledControlMarginSize;
};
static const MetricsRCData_t* s_pMetrics;
};
#endif // !defined __LAYOUT_HPP__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -