本文整理汇总了C++中WndButton::GetLeft方法的典型用法代码示例。如果您正苦于以下问题:C++ WndButton::GetLeft方法的具体用法?C++ WndButton::GetLeft怎么用?C++ WndButton::GetLeft使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WndButton
的用法示例。
在下文中一共展示了WndButton::GetLeft方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dlgWayPointDetailsShowModal
//.........这里部分代码省略.........
//
// Details (WAYNOTES) page
//
wDetailsEntry = (WndOwnerDrawFrame*)wf->FindByName(TEXT("frmDetailsEntry"));
LKASSERT(wDetailsEntry!=NULL);
wDetailsEntry->SetCanFocus(true);
nTextLines = TextToLineOffsets(WayPointList[SelectedWaypoint].Details,
LineOffsets,
MAXLINES);
// ScrollbarWidth is initialised from DrawScrollBar in WindowControls, so it might not be ready here
if ( wDetails->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
wDetails->ScrollbarWidth = (int) (SCROLLBARWIDTH_INITIAL * ScreenDScale * SHRINKSBFACTOR);
}
wDetailsEntry->SetWidth(wDetails->GetWidth() - wDetails->ScrollbarWidth - 5);
WndButton *wb;
TCHAR captmp[200];
// Resize also buttons
wb = ((WndButton *)wf->FindByName(TEXT("cmdInserInTask")));
if (wb) {
wb->SetOnClickNotify(OnInserInTaskClicked);
wb->SetWidth(wCommand->GetWidth()-wb->GetLeft()*2);
if ((ActiveWayPoint<0) || !ValidTaskPoint(0)) {
// this is going to be the first tp (ActiveWayPoint 0)
_stprintf(captmp,_T("%s"),MsgToken(1824)); // insert as START
} else {
LKASSERT(ActiveWayPoint>=0 && ValidTaskPoint(0));
int indexInsert = max(ActiveWayPoint,0); // safe check
if (indexInsert==0) {
_stprintf(captmp,_T("%s"),MsgToken(1824)); // insert as START
} else {
LKASSERT(ValidWayPoint(Task[indexInsert].Index));
_stprintf(captmp,_T("%s <%s>"),MsgToken(1825),WayPointList[ Task[indexInsert].Index ].Name); // insert before xx
}
}
wb->SetCaption(captmp);
}
wb = ((WndButton *)wf->FindByName(TEXT("cmdAppendInTask1")));
if (wb) {
wb->SetOnClickNotify(OnAppendInTask1Clicked);
wb->SetWidth(wCommand->GetWidth()-wb->GetLeft()*2);
}
wb = ((WndButton *)wf->FindByName(TEXT("cmdAppendInTask2")));
if (wb) {
wb->SetOnClickNotify(OnAppendInTask2Clicked);
wb->SetWidth(wCommand->GetWidth()-wb->GetLeft()*2);
}
wb = ((WndButton *)wf->FindByName(TEXT("cmdRemoveFromTask")));
if (wb) {
wb->SetOnClickNotify(OnRemoveFromTaskClicked);
示例2: dlgWayPointDetailsShowModal
void dlgWayPointDetailsShowModal(short mypage){
TCHAR sTmp[128];
double sunsettime;
int sunsethours;
int sunsetmins;
WndProperty *wp;
if (!ScreenLandscape) {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgWayPointDetails_L.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_WAYPOINTDETAILS_L"));
} else {
char filename[MAX_PATH];
LocalPathS(filename, TEXT("dlgWayPointDetails.xml"));
wf = dlgLoadFromXML(CallBackTable,
filename,
hWndMainWindow,
TEXT("IDR_XML_WAYPOINTDETAILS"));
}
nTextLines = 0;
if (!wf) return;
wInfo = ((WndFrame *)wf->FindByName(TEXT("frmInfos")));
wCommand = ((WndFrame *)wf->FindByName(TEXT("frmCommands")));
wSpecial = ((WndFrame *)wf->FindByName(TEXT("frmSpecial")));
wDetails = (WndListFrame*)wf->FindByName(TEXT("frmDetails"));
LKASSERT(wInfo!=NULL);
LKASSERT(wCommand!=NULL);
LKASSERT(wSpecial!=NULL);
LKASSERT(wDetails!=NULL);
// Resize Frames up to real screen size on the right.
wInfo->SetBorderKind(BORDERLEFT);
wInfo->SetWidth(wf->GetWidth() - wInfo->GetLeft()-2);
wCommand->SetBorderKind(BORDERLEFT);
wCommand->SetWidth(wf->GetWidth() - wCommand->GetLeft()-2);
wSpecial->SetBorderKind(BORDERLEFT);
wSpecial->SetWidth(wf->GetWidth() - wSpecial->GetLeft()-2);
wDetails->SetBorderKind(BORDERLEFT);
wDetails->SetWidth(wf->GetWidth() - wDetails->GetLeft()-2);
wCommand->SetVisible(false);
wSpecial->SetVisible(false);
//
// CAPTION: top line in black
//
// if SeeYou waypoint
if (WPLSEL.Format == LKW_CUP) {
TCHAR ttmp[50];
// and it is landable
if ((WPLSEL.Style>1) && (WPLSEL.Style<6) ) {
_stprintf(sTmp, TEXT("%s "), WPLSEL.Name);
// ICAO name probably, let's print it
if ( _tcslen(WPLSEL.Code)==4 ) {
_stprintf(ttmp,_T("(%s) "),WPLSEL.Code);
_tcscat(sTmp, ttmp);
}
if ( _tcslen(WPLSEL.Freq)>0 ) {
_stprintf(ttmp,_T("%s "),WPLSEL.Freq);
_tcscat(sTmp, ttmp);
}
if ( WPLSEL.RunwayDir>=0 ) {
_stprintf(ttmp,_T("RW %d "),WPLSEL.RunwayDir);
_tcscat(sTmp, ttmp);
}
if ( WPLSEL.RunwayLen>0 ) {
// we use Altitude instead of distance, to keep meters and feet
_stprintf(ttmp,_T("%.0f%s"),Units::ToUserAltitude((double)WPLSEL.RunwayLen), Units::GetAltitudeName());
_tcscat(sTmp, ttmp);
}
wf->SetCaption(sTmp);
} else {
_stprintf(sTmp, TEXT("%s: "), wf->GetCaption());
_tcscat(sTmp, WayPointList[SelectedWaypoint].Name);
wf->SetCaption(sTmp);
}
} else {
_stprintf(sTmp, TEXT("%s: "), wf->GetCaption());
_tcscat(sTmp, WayPointList[SelectedWaypoint].Name);
wf->SetCaption(sTmp);
}
//
// Waypoint Comment
//
//.........这里部分代码省略.........