Exemplo n.º 1
0
static void
GetLogFont(LOGFONT &logfont)
{
  WndProperty* wp;
  wp = (WndProperty*)wf->FindByName(_T("prpFontName"));
  if (wp)
    _tcsncpy(logfont.lfFaceName,
             wp->GetDataField()->GetAsString(), LF_FACESIZE - 1);

  logfont.lfHeight = GetFormValueInteger(*wf, _T("prpFontHeight"));
  logfont.lfWeight = GetFormValueBoolean(*wf, _T("prpFontWeight")) ? 700 : 500;
  logfont.lfItalic = GetFormValueBoolean(*wf, _T("prpFontItalic"));
}
Exemplo n.º 2
0
bool
SaveFormProperty(const SubForm &form, const TCHAR *field, bool &value)
{
  bool new_value = GetFormValueBoolean(form, field);
  if (new_value == value)
    return false;

  value = new_value;
  return true;
}
Exemplo n.º 3
0
bool
SaveFormPropertyNegated(const WndForm &form, const TCHAR *field,
                        const TCHAR *profile_key, bool &value)
{
  bool new_value = !GetFormValueBoolean(form, field);
  if (new_value == value)
    return false;

  value = new_value;
  Profile::Set(profile_key, value);
  return true;
}