bool dlgFontEditShowModal(const TCHAR * FontDescription, LOGFONT &log_font, LOGFONT autoLogFont) { bool bRetVal = false; wf = LoadDialog(CallBackTable, XCSoarInterface::main_window, _T("IDR_XML_FONTEDIT")); if (wf == NULL) return false; NewLogFont = log_font; resetLogFont = autoLogFont; InitGUI(FontDescription); LoadGUI(); if (wf->ShowModal() == mrOK) { log_font = NewLogFont; bRetVal = true; } delete wf; return bRetVal; }
static void OnResetClicked(WndButton &Sender) { (void)Sender; NewLogFont = resetLogFont; LoadGUI(); }
bool dlgFontEditShowModal(const TCHAR * FontDescription, const TCHAR * FontRegKey, LOGFONT autoLogFont){ bool bRetVal=false; char filename[MAX_PATH]; IsInitialized=false; LocalPathS(filename, TEXT("dlgFontEdit.xml")); wf = dlgLoadFromXML(CallBackTable, filename, hWndMainWindow, TEXT("IDR_XML_FONTEDIT")); int UseCustomFontsold = UseCustomFonts; UseCustomFonts=1;// global var InitializeOneFont (&NewFont, FontRegKey, autoLogFont, &OriginalLogFont); UseCustomFonts=UseCustomFontsold; OriginalFontRegKey=FontRegKey; NewLogFont=OriginalLogFont; resetLogFont = autoLogFont; if (wf) { InitGUI(FontDescription); LoadGUI(); if (wf->ShowModal()==mrOK) { SaveValues(FontRegKey); bRetVal=true; } delete wf; } wf = NULL; return bRetVal; }
static void OnResetClicked(WindowControl * Sender){ (void)Sender; NewLogFont=resetLogFont; LoadGUI(); }