本文整理汇总了C++中dlgLoadFromXML函数的典型用法代码示例。如果您正苦于以下问题:C++ dlgLoadFromXML函数的具体用法?C++ dlgLoadFromXML怎么用?C++ dlgLoadFromXML使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dlgLoadFromXML函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: dlgTeamCodeShowModal
void dlgTeamCodeShowModal(void)
{
WndProperty* wp = NULL;
WndButton *buttonCode = NULL;
wf = NULL;
char filename[MAX_PATH];
if (InfoBoxLayout::landscape)
{
LocalPathS(filename, TEXT("dlgTeamCode_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_TEAMCODE_L"));
if (!wf) return;
}
else
{
LocalPathS(filename, TEXT("dlgTeamCode.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_TEAMCODE"));
if (!wf) return;
}
TCHAR sTmp[32] = { 0 };
if( WayPointList && ValidWayPoint(TeamCodeRefWaypoint)) {
// LKTOKEN [email protected]_ "Team Ref.: "
_tcsncpy(sTmp, gettext(TEXT("[email protected]_")), 20);
_tcsncat(sTmp, WayPointList[TeamCodeRefWaypoint].Name,10);
} else {
// LKTOKEN [email protected]_ "Team code: SET REF!"
_tcsncpy(sTmp, gettext(TEXT("[email protected]_")), 30);
}
wf->SetCaption(sTmp);
// set event for button
buttonCode = ((WndButton *)wf->FindByName(TEXT("cmdSetCode")));
if (buttonCode) {
buttonCode->SetOnClickNotify(OnCodeClicked);
}
// Set unit for range
wp = (WndProperty*)wf->FindByName(TEXT("prpRange"));
if (wp) {
wp->GetDataField()->SetUnits(Units::GetDistanceName());
}
Update();
wf->SetTimerNotify(OnTimerNotify);
wf->ShowModal();
delete wf;
wf=NULL;
}
开发者ID:miza,项目名称:LK8000,代码行数:60,代码来源:dlgTeamCode.cpp
示例2: dlgAirspaceShowModal
bool dlgAirspaceShowModal(bool coloredit){
colormode = coloredit;
ItemIndex = -1;
if (!ScreenLandscape) {
TCHAR filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspace_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACE_L"));
} else {
TCHAR filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspace.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACE"));
}
if (!wf) return false;
wAirspaceList = (WndListFrame*)wf->FindByName(TEXT("frmAirspaceList"));
LKASSERT(wAirspaceList!=NULL);
wAirspaceList->SetBorderKind(BORDERLEFT);
wAirspaceList->SetEnterCallback(OnAirspaceListEnter);
wAirspaceListEntry = (WndOwnerDrawFrame*)wf->
FindByName(TEXT("frmAirspaceListEntry"));
LKASSERT(wAirspaceListEntry!=NULL);
wAirspaceListEntry->SetCanFocus(true);
// ScrollbarWidth is initialised from DrawScrollBar in WindowControls, so it might not be ready here
if ( wAirspaceList->ScrollbarWidth == -1) {
#if defined (PNA)
#define SHRINKSBFACTOR 1.0 // shrink width factor. Range .1 to 1 where 1 is very "fat"
#else
#define SHRINKSBFACTOR 0.75 // shrink width factor. Range .1 to 1 where 1 is very "fat"
#endif
wAirspaceList->ScrollbarWidth = (int) (SCROLLBARWIDTH_INITIAL * ScreenDScale * SHRINKSBFACTOR);
}
wAirspaceListEntry->SetWidth(wAirspaceList->GetWidth() - wAirspaceList->ScrollbarWidth - 5);
UpdateList();
changed = false;
wf->ShowModal();
delete wf;
wf = NULL;
return changed;
}
开发者ID:IvanSantanna,项目名称:LK8000,代码行数:59,代码来源:dlgAirspace.cpp
示例3: dlgBasicSettingsShowModal
void dlgBasicSettingsShowModal(void){
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgBasicSettings.xml")); // no worry missing _L, it is unused anyway
if (!InfoBoxLayout::landscape)
wf = dlgLoadFromXML(CallBackTable, filename, hWndMainWindow, TEXT("IDR_XML_BASICSETTINGS_L"));
else
wf = dlgLoadFromXML(CallBackTable, filename, hWndMainWindow, TEXT("IDR_XML_BASICSETTINGS"));
WndProperty* wp;
// BallastTimerActive = false;
if (wf) {
wf->SetTimerNotify(OnTimerNotify);
((WndButton *)wf->FindByName(TEXT("buttonDumpBallast")))->SetVisible(!BallastTimerActive);
((WndButton *)wf->FindByName(TEXT("buttonStopDump")))->SetVisible(BallastTimerActive);
wp = (WndProperty*)wf->FindByName(TEXT("prpAltitude"));
if (wp) {
wp->GetDataField()->SetAsFloat(
Units::ToUserAltitude(GPS_INFO.BaroAltitude));
wp->GetDataField()->SetUnits(Units::GetAltitudeName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpBallastLitres"));
if (wp) {
wp->GetDataField()-> SetAsFloat(GlidePolar::BallastLitres);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpWingLoading"));
if (wp) {
if (GlidePolar::WingLoading>0.1) {
wp->GetDataField()-> SetAsFloat(GlidePolar::WingLoading);
} else {
wp->SetVisible(false);
}
wp->RefreshDisplay();
}
if (CALCULATED_INFO.Flying) {
wp = (WndProperty*)wf->FindByName(TEXT("prpQNH"));
if (wp) {
wp->GetDataField()->SetDisplayFormat(_T("%.0f"));
}
}
wf->ShowModal();
delete wf;
}
wf = NULL;
}
开发者ID:jarda-manana,项目名称:LK8000,代码行数:55,代码来源:dlgBasicSettings.cpp
示例4: dlgAirspaceShowModal
bool dlgAirspaceShowModal(bool coloredit){
colormode = coloredit;
ItemIndex = -1;
if (!InfoBoxLayout::landscape) {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspace_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACE_L"));
} else {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspace.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACE"));
}
if (!wf) return false;
ASSERT(wf!=NULL);
wAirspaceList = (WndListFrame*)wf->FindByName(TEXT("frmAirspaceList"));
ASSERT(wAirspaceList!=NULL);
wAirspaceList->SetBorderKind(BORDERLEFT);
wAirspaceList->SetEnterCallback(OnAirspaceListEnter);
wAirspaceListEntry = (WndOwnerDrawFrame*)wf->
FindByName(TEXT("frmAirspaceListEntry"));
ASSERT(wAirspaceListEntry!=NULL);
wAirspaceListEntry->SetCanFocus(true);
UpdateList();
changed = false;
wf->ShowModal();
// now retrieve back the properties...
if (changed) {
StoreRegistry();
// DoStatusMessage(TEXT("Configuration saved")); // REMOVE FIXV2
DoStatusMessage(gettext(TEXT("[email protected]_"))); // Configuration saved
};
delete wf;
wf = NULL;
return changed;
}
开发者ID:jarda-manana,项目名称:LK8000,代码行数:54,代码来源:dlgAirspace.cpp
示例5: dlgChecklistShowModal
void dlgChecklistShowModal(void){
static bool first=true;
if (first) {
LoadChecklist();
first=false;
}
// WndProperty *wp;
if (!ScreenLandscape) {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgChecklist_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_CHECKLIST_L"));
} else {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgChecklist.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_CHECKLIST"));
}
nTextLines = 0;
if (!wf) return;
wf->SetKeyDownNotify(FormKeyDown);
((WndButton *)wf->FindByName(TEXT("cmdClose")))->SetOnClickNotify(OnCloseClicked);
wDetails = (WndListFrame*)wf->FindByName(TEXT("frmDetails"));
ASSERT(wDetails!=NULL);
wDetailsEntry =
(WndOwnerDrawFrame*)wf->FindByName(TEXT("frmDetailsEntry"));
ASSERT(wDetailsEntry!=NULL);
wDetailsEntry->SetCanFocus(true);
wDetails->SetBorderKind(BORDERLEFT);
page = 0;
NextPage(0); // JMW just to turn proper pages on/off
wf->ShowModal();
delete wf;
wf = NULL;
}
开发者ID:braun,项目名称:LK8000,代码行数:54,代码来源:dlgChecklist.cpp
示例6: dlgWaypointEditShowModal
void dlgWaypointEditShowModal(WAYPOINT *wpt) {
if (!wpt) {
return;
}
global_wpt = wpt;
if (!ScreenLandscape) {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgWaypointEdit_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_WAYPOINTEDIT_L"));
} else {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgWaypointEdit.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_WAYPOINTEDIT"));
}
if (wf) {
buttonName = ((WndButton *)wf->FindByName(TEXT("cmdName")));
if (buttonName) {
buttonName->SetOnClickNotify(OnNameClicked);
}
buttonComment = ((WndButton *)wf->FindByName(TEXT("cmdComment")));
if (buttonComment) {
buttonComment->SetOnClickNotify(OnCommentClicked);
}
UpdateButtons();
SetUnits();
SetValues();
wf->SetModalResult(mrCancle);
if (wf->ShowModal()==mrOK) {
////
GetValues();
}
delete wf;
}
wf = NULL;
}
开发者ID:braun,项目名称:LK8000,代码行数:54,代码来源:dlgWaypointEdit.cpp
示例7: dlgFlarmTrafficShowModal
void dlgFlarmTrafficShowModal(void){
static bool first=true;
if (first) {
first=false;
}
if (InfoBoxLayout::landscape) {
wf = dlgLoadFromXML(CallBackTable,
TEXT("dlgFlarmTraffic_L.xml"),
XCSoarInterface::main_window,
TEXT("IDR_XML_FLARMTRAFFIC_L"));
} else {
wf = dlgLoadFromXML(CallBackTable,
TEXT("dlgFlarmTraffic.xml"),
XCSoarInterface::main_window,
TEXT("IDR_XML_FLARMTRAFFIC"));
}
nTextLines = 0;
if (!wf) return;
wf->SetKeyDownNotify(FormKeyDown);
((WndButton *)wf->FindByName(TEXT("cmdClose")))->SetOnClickNotify(OnCloseClicked);
wDetails = (WndListFrame*)wf->FindByName(TEXT("frmDetails"));
wDetails->SetEnterCallback(OnListEnter);
assert(wDetails!=NULL);
wDetailsEntry =
(WndOwnerDrawFrame*)wf->FindByName(TEXT("frmDetailsEntry"));
assert(wDetailsEntry!=NULL);
wDetailsEntry->SetCanFocus(true);
wDetails->SetBorderKind(BORDERLEFT);
page = 0;
wDetails->ResetList();
Update();
wf->SetTimerNotify(OnTimerNotify);
wf->ShowModal();
delete wf;
wf = NULL;
}
开发者ID:scottp,项目名称:xcsoar,代码行数:53,代码来源:dlgFlarmTraffic.cpp
示例8: dlgChecklistShowModal
void dlgChecklistShowModal(void){
static bool first=true;
if (first) {
LoadChecklist();
first=false;
}
// WndProperty *wp;
if (!InfoBoxLayout::landscape) {
wf = dlgLoadFromXML(CallBackTable,
TEXT("dlgChecklist_L.xml"),
XCSoarInterface::main_window,
TEXT("IDR_XML_CHECKLIST_L"));
} else {
wf = dlgLoadFromXML(CallBackTable,
TEXT("dlgChecklist.xml"),
XCSoarInterface::main_window,
TEXT("IDR_XML_CHECKLIST"));
}
nTextLines = 0;
if (!wf) return;
wf->SetKeyDownNotify(FormKeyDown);
((WndButton *)wf->FindByName(TEXT("cmdClose")))->SetOnClickNotify(OnCloseClicked);
wDetails = (WndListFrame*)wf->FindByName(TEXT("frmDetails"));
assert(wDetails!=NULL);
wDetailsEntry =
(WndOwnerDrawFrame*)wf->FindByName(TEXT("frmDetailsEntry"));
assert(wDetailsEntry!=NULL);
wDetailsEntry->SetCanFocus(true);
wDetails->SetBorderKind(BORDERLEFT);
page = 0;
NextPage(0); // JMW just to turn proper pages on/off
wf->ShowModal();
delete wf;
wf = NULL;
}
开发者ID:scottp,项目名称:xcsoar,代码行数:50,代码来源:dlgChecklist.cpp
示例9: dlgAirspaceShowModal
bool dlgAirspaceShowModal(bool coloredit){
colormode = coloredit;
ItemIndex = -1;
if (!ScreenLandscape) {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspace_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACE_L"));
} else {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspace.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACE"));
}
if (!wf) return false;
//ASSERT(wf!=NULL);
wAirspaceList = (WndListFrame*)wf->FindByName(TEXT("frmAirspaceList"));
//ASSERT(wAirspaceList!=NULL);
wAirspaceList->SetBorderKind(BORDERLEFT);
wAirspaceList->SetEnterCallback(OnAirspaceListEnter);
wAirspaceListEntry = (WndOwnerDrawFrame*)wf->
FindByName(TEXT("frmAirspaceListEntry"));
//ASSERT(wAirspaceListEntry!=NULL);
wAirspaceListEntry->SetCanFocus(true);
UpdateList();
changed = false;
wf->ShowModal();
delete wf;
wf = NULL;
return changed;
}
开发者ID:Mazuk,项目名称:LK8000,代码行数:48,代码来源:dlgAirspace.cpp
示例10: dlgAirspaceColoursShowModal
int dlgAirspaceColoursShowModal(void){
ItemIndex = -1;
if (!InfoBoxLayout::landscape) {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspaceColours_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACECOLOURS_L"));
} else {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspaceColours.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACECOLOURS"));
}
if (!wf) return -1;
ASSERT(wf!=NULL);
wAirspaceColoursList = (WndListFrame*)wf->FindByName(TEXT("frmAirspaceColoursList"));
ASSERT(wAirspaceColoursList!=NULL);
wAirspaceColoursList->SetBorderKind(BORDERLEFT);
wAirspaceColoursList->SetEnterCallback(OnAirspaceColoursListEnter);
wAirspaceColoursListEntry = (WndOwnerDrawFrame*)wf->
FindByName(TEXT("frmAirspaceColoursListEntry"));
ASSERT(wAirspaceColoursListEntry!=NULL);
wAirspaceColoursListEntry->SetCanFocus(true);
UpdateList();
wf->ShowModal();
// now retrieve back the properties...
delete wf;
wf = NULL;
return ItemIndex;
}
开发者ID:jarda-manana,项目名称:LK8000,代码行数:48,代码来源:dlgAirspaceColours.cpp
示例11: dlgLoggerReplayShowModal
void dlgLoggerReplayShowModal(void){
wf = dlgLoadFromXML(CallBackTable, IDR_XML_LOGGERREPLAY);
WndProperty* wp;
if (wf) {
wp = (WndProperty*)wf->FindByName(TEXT("prpRate"));
if (wp) {
wp->GetDataField()->SetAsFloat(ReplayLogger::TimeScale);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpIGCFile"));
if (wp) {
DataFieldFileReader* dfe = static_cast<DataFieldFileReader*>(wp->GetDataField());
if(dfe) {
dfe->ScanDirectoryTop(_T(LKD_LOGS), _T("*" LKS_IGC));
dfe->Lookup(ReplayLogger::GetFilename());
}
wp->RefreshDisplay();
}
wf->ShowModal();
delete wf;
}
wf = NULL;
}
开发者ID:LK8000,项目名称:LK8000,代码行数:29,代码来源:dlgLoggerReplay.cpp
示例12: dlgLoggerReplayShowModal
void dlgLoggerReplayShowModal(void){
TCHAR tsuf[10];
TCHAR filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgLoggerReplay.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
TEXT("IDR_XML_LOGGERREPLAY"));
WndProperty* wp;
if (wf) {
wp = (WndProperty*)wf->FindByName(TEXT("prpRate"));
if (wp) {
wp->GetDataField()->SetAsFloat(ReplayLogger::TimeScale);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpIGCFile"));
if (wp) {
DataFieldFileReader* dfe;
dfe = (DataFieldFileReader*)wp->GetDataField();
// dfe->ScanDirectoryTop(_T(""),TEXT("*.igc"));
_stprintf(tsuf,_T("*%s"),_T(LKS_IGC));
dfe->ScanDirectoryTop(_T(LKD_LOGS),tsuf);
dfe->Lookup(ReplayLogger::GetFilename());
wp->RefreshDisplay();
}
wf->ShowModal();
delete wf;
}
wf = NULL;
}
开发者ID:alberiolima,项目名称:LK8000,代码行数:35,代码来源:dlgLoggerReplay.cpp
示例13: dlgTextEntryKeyboardShowModal
void dlgTextEntryKeyboardShowModal(TCHAR *text, int width, const TCHAR* szFile, const TCHAR* szResource)
{
first = true;
wf = NULL;
if (width==0) {
width = MAX_TEXTENTRY;
}
max_width = min(MAX_TEXTENTRY, width);
char filename[MAX_PATH];
LocalPathS(filename, szFile);
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
szResource);
if (!wf) return;
cursor = 0;
ClearText();
if (_tcslen(text)>0) {
_tcsupr(text);
LK_tcsncpy(edittext, text, max_width-1);
// position cursor at the end of imported text
cursor=_tcslen(text);
}
UpdateTextboxProp();
wf->SetKeyDownNotify(FormKeyDown);
wf->ShowModal();
LK_tcsncpy(text, edittext, max_width-1);
delete wf;
wf=NULL;
}
开发者ID:Acrobot,项目名称:LK8000,代码行数:33,代码来源:dlgTextEntry_Keyboard.cpp
示例14: dlgAirspaceColoursShowModal
int dlgAirspaceColoursShowModal(void){
ItemIndex = -1;
wf = dlgLoadFromXML(CallBackTable,
ScreenLandscape ? TEXT("dlgAirspaceColours_L.xml") : TEXT("dlgAirspaceColours_P.xml"),
ScreenLandscape ? IDR_XML_AIRSPACECOLOURS_L : IDR_XML_AIRSPACECOLOURS_P);
if (!wf) return -1;
wAirspaceColoursList = (WndListFrame*)wf->FindByName(TEXT("frmAirspaceColoursList"));
if(wAirspaceColoursList) {
wAirspaceColoursList->SetEnterCallback(OnAirspaceColoursListEnter);
}
wAirspaceColoursListEntry = (WndOwnerDrawFrame*)wf->FindByName(TEXT("frmAirspaceColoursListEntry"));
if(wAirspaceColoursListEntry) {
wAirspaceColoursListEntry->SetCanFocus(true);
}
UpdateList();
wf->ShowModal();
delete wf;
wf = NULL;
return ItemIndex;
}
开发者ID:PhilColbert,项目名称:LK8000,代码行数:30,代码来源:dlgAirspaceColours.cpp
示例15: dlgMultimapsShowModal
void dlgMultimapsShowModal(void){
WndProperty *wp;
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgMultimaps.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_MULTIMAPS"));
if (!wf) return;
setVariables();
wf->ShowModal();
wp = (WndProperty*)wf->FindByName(TEXT("prpMultimap1"));
if (wp) Multimap1 = (wp->GetDataField()->GetAsInteger());
wp = (WndProperty*)wf->FindByName(TEXT("prpMultimap2"));
if (wp) Multimap2 = (wp->GetDataField()->GetAsInteger());
wp = (WndProperty*)wf->FindByName(TEXT("prpMultimap3"));
if (wp) Multimap3 = (wp->GetDataField()->GetAsInteger());
UpdateMultimapOrient();
delete wf;
wf = NULL;
}
开发者ID:Turbo87,项目名称:LK8000,代码行数:30,代码来源:dlgMultimaps.cpp
示例16: dlgTextEntryKeyboardShowModal
void dlgTextEntryKeyboardShowModal(TCHAR *text, int width, const TCHAR* szFile, const TCHAR* szResource)
{
first = true;
wf = NULL;
if (width==0) {
width = MAX_TEXTENTRY;
}
max_width = min(MAX_TEXTENTRY, width);
char filename[MAX_PATH];
LocalPathS(filename, szFile);
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
szResource);
if (!wf) return;
cursor = 0;
ClearText();
if (_tcslen(text)>0) {
_tcsupr(text);
LK_tcsncpy(edittext, text, max_width-1);
// show previous test.
// this text is replaced by first key down
// but used if "OK" is clicked first for don't reset current value.
}
UpdateTextboxProp();
wf->SetKeyDownNotify(FormKeyDown);
wf->ShowModal();
LK_tcsncpy(text, edittext, max_width-1);
delete wf;
wf=NULL;
}
开发者ID:AlphaLima,项目名称:LK8000,代码行数:35,代码来源:dlgTextEntry_Keyboard.cpp
示例17: dlgWindSettingsShowModal
void dlgWindSettingsShowModal(void){
TCHAR filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgWindSettings.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
TEXT("IDR_XML_WINDSETTINGS"));
if (wf) {
WndProperty* wp;
wp = (WndProperty*)wf->FindByName(TEXT("prpSpeed"));
if (wp) {
wp->GetDataField()->SetUnits(Units::GetHorizontalSpeedName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpAutoWind"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
// LKTOKEN [email protected]_ = "Manual"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "Circling"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
dfe->addEnumText(gettext(TEXT("ZigZag")));
// LKTOKEN [email protected]_ = "Both"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
dfe->addEnumText(MsgToken(1793)); // External
wp->GetDataField()->Set(AutoWindMode);
wp->RefreshDisplay();
wp = (WndProperty*)wf->FindByName(TEXT("prpTrailDrift"));
if (wp) {
wp->GetDataField()->Set(MapWindow::EnableTrailDrift);
wp->RefreshDisplay();
}
}
wf->ShowModal();
wp = (WndProperty*)wf->FindByName(TEXT("prpAutoWind"));
if (wp) {
if (AutoWindMode != wp->GetDataField()->GetAsInteger()) {
AutoWindMode = wp->GetDataField()->GetAsInteger();
}
}
wp = (WndProperty*)wf->FindByName(TEXT("prpTrailDrift"));
if (wp) {
if (MapWindow::EnableTrailDrift != wp->GetDataField()->GetAsBoolean()) {
MapWindow::EnableTrailDrift = wp->GetDataField()->GetAsBoolean();
}
}
delete wf;
}
wf = NULL;
}
开发者ID:alberiolima,项目名称:LK8000,代码行数:60,代码来源:dlgWindSettings.cpp
示例18: dlgAirspaceDetails
void dlgAirspaceDetails(int the_circle, int the_area) {
index_circle = the_circle;
index_area = the_area;
if ((index_area<=0) && (index_circle <=0)) {
return;
}
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgAirspaceDetails.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_AIRSPACEDETAILS"));
if (!wf) return;
ASSERT(wf!=NULL);
SetValues();
wf->ShowModal();
delete wf;
wf = NULL;
return;
}
开发者ID:jarda-manana,项目名称:LK8000,代码行数:26,代码来源:dlgAirspaceDetails.cpp
示例19: dlgVoiceShowModal
void dlgVoiceShowModal(void){
wf = dlgLoadFromXML(CallBackTable,
_T("dlgVoice.xml"),
XCSoarInterface::main_window,
_T("IDR_XML_VOICE"));
if (!wf) return;
LoadIntoForm(*wf, XCSoarInterface::SettingsComputer());
wf->ShowModal();
bool changed = false;
changed = SaveFromForm(*wf, XCSoarInterface::SetSettingsComputer());
if (changed) {
Profile::StoreRegistry();
MessageBoxX(gettext(_T("Changes to configuration saved.")),
_T(""), MB_OK);
}
delete wf;
wf = NULL;
}
开发者ID:bugburner,项目名称:xcsoar,代码行数:28,代码来源:dlgVoice.cpp
示例20: dlgTextEntryKeyboardShowModal
void dlgTextEntryKeyboardShowModal(TCHAR *text, int width, unsigned ResID)
{
wf = NULL;
if (width==0) {
width = MAX_TEXTENTRY;
}
max_width = min(MAX_TEXTENTRY, width);
wf = dlgLoadFromXML(CallBackTable, ResID);
if (!wf) return;
// cursor = _tcslen(text);
ClearText();
if (_tcslen(text)>0) {
CharUpper(text);
LK_tcsncpy(edittext, text, max_width-1);
// show previous test.
// this text is replaced by first key down
// but used if "OK" is clicked first for don't reset current value.
}
cursor = _tcslen(edittext);
UpdateTextboxProp();
WindowControl* pBtHelp = wf->FindByName(TEXT("cmdHelp"));
if(pBtHelp) {
pBtHelp->SetVisible(wKeyboardPopupWndProperty && wKeyboardPopupWndProperty->HasHelpText());
}
wf->SetKeyDownNotify(FormKeyDown);
wf->ShowModal();
LK_tcsncpy(text, edittext, max_width-1);
// cursor = _tcslen(text);
delete wf;
wf=NULL;
}
开发者ID:lshachar,项目名称:LK8000,代码行数:35,代码来源:dlgTextEntry_Keyboard.cpp
注:本文中的dlgLoadFromXML函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论