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")); }
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; }
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; }