void CMiscToolbar::OnShowWindow(BOOL bShow, UINT nStatus) { CRToolBar::OnShowWindow(bShow, nStatus); //DEADCODE RDH 19/03/99 if (!RFullPanelDial::incomms) //rdh 10/1/99 //DEADCODE RDH 19/03/99 { //DEADCODE RDH 19/03/99 CRButton* b; //DEADCODE RDH 19/03/99 b=GETDLGITEM(IDC_REPLAY); //DEADCODE RDH 19/03/99 b->ShowWindow(SW_SHOW); //DEADCODE RDH 19/03/99 b=GETDLGITEM(IDC_READYROOM); //DEADCODE RDH 19/03/99 b->ShowWindow(SW_HIDE); //DEADCODE RDH 19/03/99 }else //DEADCODE RDH 19/03/99 { //DEADCODE RDH 19/03/99 CRButton* b; //DEADCODE RDH 19/03/99 b=GETDLGITEM(IDC_REPLAY); //DEADCODE RDH 19/03/99 b->ShowWindow(SW_HIDE); //DEADCODE RDH 19/03/99 b=GETDLGITEM(IDC_READYROOM); //DEADCODE RDH 19/03/99 b->ShowWindow(SW_SHOW); //DEADCODE RDH 19/03/99 } CRButton* but = GETDLGITEM(IDC_REPLAY); but->SetPressed(FALSE); //always lift replay button, might have been pressed if (RFullPanelDial::incomms) { but->SetDisabled(true); but->SetHintString(RESSTRING(NOTAVAIL)); }else { but->SetDisabled(false); but->SetHintString(RESSTRING(REPLAY)); } but = GETDLGITEM(IDC_READYROOM); but->SetPressed(FALSE); //always lift replay button, might have been pressed if (!RFullPanelDial::incomms) { but->SetDisabled(true); but->SetHintString(RESSTRING(NOTAVAIL)); }else { but->SetDisabled(false); but->SetHintString(RESSTRING(READYROOM)); } but = GETDLGITEM(dialids[DIRECTIVESTOGGLE]); but->SetPressed(!MMC.directivespopup); }
void LWDiaryDetails::RefreshButtons() { CRButton* but; if (quickmission) { but = GETDLGITEM(IDC_RBUTTON_PREV); but->ShowWindow(false); but = GETDLGITEM(IDC_RBUTTON_NEXT); but->ShowWindow(false); }else { but = GETDLGITEM(IDC_RBUTTON_PREV); but->ShowWindow(true); if (*currentptr != 0) { but->SetForeColor(RGB(255,255,0)); but->SetDisabled(false); }else { but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); } but = GETDLGITEM(IDC_RBUTTON_NEXT); but->ShowWindow(true); if (grdtlsptr[*currentptr +1] != NULL) { but->SetForeColor(RGB(255,255,0)); but->SetDisabled(false); }else { but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); } } }
void LWRouteMain::RefreshButtons() { if (Todays_Packages.hiwp != UID_Null) { info_waypoint* wp=*Persons2::ConvertPtrUID(Todays_Packages.hiwp); CRButton* but; but = GETDLGITEM(IDC_RBUTTONINSERT); if ( (wp->uid.Evaluate() == -SGR_WPP_TakeOff) || (wp->uid.Evaluate() == -SGR_WPP_EscDisperse) || (wp->uid.Evaluate() == -SGR_WPP_BombDisperse) || (wp->uid.Evaluate() == -SGR_WPP_Landing) || (wp->uid.Evaluate() == -SGR_WPC_TakeOff) || (wp->uid.Evaluate() == -SGR_WPC_Landing) ) { but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); }else { but->SetForeColor(RGB(255,255,0)); but->SetBackColor(RGB(255,255,0)); but->SetDisabled(false); } but = GETDLGITEM(IDC_RBUTTONDELETE); if (wp->uid.Evaluate() == GOT_UNDEFINED_VAL) //user wp { but->SetForeColor(RGB(255,255,0)); but->SetDisabled(false); but->SetBackColor(RGB(255,255,0)); }else { but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); } but = GETDLGITEM(IDC_RBUTTONCENTRE); but->SetForeColor(RGB(255,255,0)); but->SetBackColor(RGB(255,255,0)); but->SetDisabled(false); but = GETDLGITEM(IDC_RBUTTONNEWDOGLEG); if (RFullPanelDial::gameside == RFullPanelDial::SIDE_LW) { but->ShowWindow(true); if (Todays_Packages.pack[Todays_Packages.hipack].packagestatus < Profile::PS_TAKINGOFF) { but->SetForeColor(RGB(255,255,0)); but->SetBackColor(RGB(255,255,0)); but->SetDisabled(false); }else { but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); } }else { but->ShowWindow(false); } but = GETDLGITEM(IDC_RBUTTONAPPLYALT); but->SetForeColor(RGB(255,255,0)); but->SetBackColor(RGB(255,255,0)); but->SetDisabled(false); }else { CRButton* but = GETDLGITEM(IDC_RBUTTONINSERT); but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); but = GETDLGITEM(IDC_RBUTTONDELETE); but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); but = GETDLGITEM(IDC_RBUTTONCENTRE); but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); but = GETDLGITEM(IDC_RBUTTONNEWDOGLEG); but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); but = GETDLGITEM(IDC_RBUTTONAPPLYALT); but->SetForeColor(RGB(160,160,0)); but->SetBackColor(RGB(160,160,0)); but->SetDisabled(true); } }