本文整理汇总了C++中CControl::SetMiscValue方法的典型用法代码示例。如果您正苦于以下问题:C++ CControl::SetMiscValue方法的具体用法?C++ CControl::SetMiscValue怎么用?C++ CControl::SetMiscValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CControl
的用法示例。
在下文中一共展示了CControl::SetMiscValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MetaProc
//.........这里部分代码省略.........
return FALSE;
}
}
}
else if (cmp (pparameter, L"right"))
{
if(pvalue == NULL || pvalue[0] == NULL)
return pcontrol->SetRight (0);
else
{
// JS can pass in integer values as floats -> check if a string is a float and then transform it to int.
if (isFloat(pvalue)) return pcontrol->SetRight (_wtoi (pvalue));
else
{
WRITELOG (L"Unknown right value: %s", pvalue);
return FALSE;
}
}
}
else if (cmp (pparameter, L"top"))
{
if(pvalue == NULL || pvalue[0] == NULL)
return pcontrol->SetTop (0);
else
{
// JS can pass in integer values as floats -> check if a string is a float and then transform it to int.
if (isFloat(pvalue)) return pcontrol->SetTop (_wtoi (pvalue));
else
{
WRITELOG (L"Unknown top value: %s", pvalue);
return FALSE;
}
}
}
else if (cmp (pparameter, L"width"))
{
if(pvalue == NULL || pvalue[0] == NULL)
return pcontrol->SetWidth (0);
else
{
// JS can pass in integer values as floats -> check if a string is a float and then transform it to int.
if (isFloat(pvalue)) return pcontrol->SetWidth (_wtoi (pvalue));
else
{
WRITELOG (L"Unknown width value: %s", pvalue);
return FALSE;
}
}
}
else if (cmp (pparameter, L"height"))
{
if(pvalue == NULL || pvalue[0] == NULL)
return pcontrol->SetHeight (0);
else
{
// JS can pass in integer values as floats -> check if a string is a float and then transform it to int.
if (isFloat(pvalue)) return pcontrol->SetHeight (_wtoi (pvalue));
else
{
WRITELOG (L"Unknown height value: %s", pvalue);
return FALSE;
}
}
}
else if (cmp (pparameter, L"image"))
return pcontrol->SetImage (pvalue);
else if (cmp (pparameter, L"imageup"))
return pcontrol->SetImageUp (pvalue);
else if (cmp (pparameter, L"imagedown"))
return pcontrol->SetImageDown (pvalue);
else if (cmp (pparameter, L"color") || cmp (pparameter, L"colour"))
return pcontrol->SetColour (pvalue);
else if (cmp (pparameter, L"click"))
return pcontrol->SetClick (pvalue);
else if (cmp (pparameter, L"border"))
{
if (cmp (pvalue, L"visible"))
return pcontrol->SetBorder (TRUE);
else if (cmp (pvalue, L"hidden"))
return pcontrol->SetBorder (FALSE);
else
{
WRITELOG (L"Unknown border value: %s", pvalue);
return FALSE;
}
}
else
{
// See if the control wants any non-standard parameter not handled above
if (pcontrol->SetMiscValue (pparameter, pvalue))
return TRUE;
WRITELOG (L"Unknown parameter: %s", pparameter);
return FALSE;
}
return TRUE;
}