本文整理汇总了C++中CConfigParser::ReadRECT方法的典型用法代码示例。如果您正苦于以下问题:C++ CConfigParser::ReadRECT方法的具体用法?C++ CConfigParser::ReadRECT怎么用?C++ CConfigParser::ReadRECT使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConfigParser
的用法示例。
在下文中一共展示了CConfigParser::ReadRECT方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadOptions
/*
** Read the options specified in the ini file.
**
*/
void CMeterImage::ReadOptions(CConfigParser& parser, const WCHAR* section)
{
CMeter::ReadOptions(parser, section);
m_Path = parser.ReadString(section, L"Path", L"");
if (!m_Path.empty())
{
if (!CSystem::IsPathSeparator(m_Path[m_Path.length() - 1]))
{
m_Path += L'\\';
}
}
m_ImageName = parser.ReadString(section, L"ImageName", L"");
m_PreserveAspectRatio = 0!=parser.ReadInt(section, L"PreserveAspectRatio", 0);
m_Tile = 0!=parser.ReadInt(section, L"Tile", 0);
static const RECT defMargins = {0};
m_ScaleMargins = parser.ReadRECT(section, L"ScaleMargins", defMargins);
// Read tinting options
m_Image.ReadOptions(parser, section);
if (m_Initialized && m_Measures.empty() && !m_DynamicVariables)
{
Initialize();
m_NeedsRedraw = true;
}
}
示例2: ReadOptions
/*
** Read the options specified in the ini file.
**
*/
void CMeterImage::ReadOptions(CConfigParser& parser, const WCHAR* section)
{
CMeter::ReadOptions(parser, section);
m_Path = parser.ReadString(section, L"Path", L"");
if (!m_Path.empty())
{
if (!CSystem::IsPathSeparator(m_Path[m_Path.length() - 1]))
{
m_Path += L'\\';
}
}
m_ImageName = parser.ReadString(section, L"ImageName", L"");
int mode = parser.ReadInt(section, L"Tile", 0);
if (mode != 0)
{
m_DrawMode = DRAWMODE_TILE;
}
else
{
mode = parser.ReadInt(section, L"PreserveAspectRatio", 0);
switch (mode)
{
case 0:
m_DrawMode = DRAWMODE_NONE;
break;
case 1:
default:
m_DrawMode = DRAWMODE_KEEPRATIO;
break;
case 2:
m_DrawMode = DRAWMODE_KEEPRATIOANDCROP;
break;
}
}
static const RECT defMargins = {0};
m_ScaleMargins = parser.ReadRECT(section, L"ScaleMargins", defMargins);
// Read tinting options
m_Image.ReadOptions(parser, section);
if (m_Initialized && m_Measures.empty() && !m_DynamicVariables)
{
Initialize();
m_NeedsRedraw = true;
}
}