当前位置: 首页>>代码示例>>C++>>正文


C++ WndButton::Redraw方法代码示例

本文整理汇总了C++中WndButton::Redraw方法的典型用法代码示例。如果您正苦于以下问题:C++ WndButton::Redraw方法的具体用法?C++ WndButton::Redraw怎么用?C++ WndButton::Redraw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WndButton的用法示例。


在下文中一共展示了WndButton::Redraw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetValues


//.........这里部分代码省略.........
        wDetails->Enable(true);
      }
      else wDetails->Enable(false);
    }
  }

#ifdef  RADIO_ACTIVE

  WindowControl* wFreq = wf->FindByName(TEXT("cmdSFrequency"));
  if (wFreq) {
    bool bRadio = false;

    if(RadioPara.Enabled) {

	  double fASFrequency = ExtractFrequency((TCHAR*)airspace_copy.Name());
	  if(!ValidFrequency(fASFrequency))
	  {
		fASFrequency = ExtractFrequency((TCHAR*)airspace_copy.Comment());
	  }
	  
      if(ValidFrequency(fASFrequency)) {

        WindowControl* wClose = wf->FindByName(TEXT("cmdClose"));
        if(wClose) {
          wClose->SetLeft(IBLSCALE(115));
          wClose->SetWidth(IBLSCALE(120));
        }

        wFreq->SetLeft(IBLSCALE(3));
        wFreq->SetWidth(IBLSCALE(110));

        _stprintf(buffer2,_T("%7.3fMHz"),fASFrequency);
        wFreq->SetCaption(buffer2);
        wFreq->Redraw();
        bRadio = true;
      }
    }
    wFreq->SetVisible(bRadio);
  }

#else
  WndProperty* wFreq = wf->FindByName(TEXT("cmdSFrequency"));
  if (wFreq) {
    wFreq->Hide();
  }
#endif  // RADIO_ACTIVE        
  // ONLY for DIAGNOSTICS- ENABLE ALSO XML
  #if 0
  wp = (WndProperty*)wf->FindByName(TEXT("prpWarnLevel"));
  if (wp) {
	  switch (airspace_copy.WarningLevel()) {
		default:
		  // LKTOKEN [email protected]_ "Unknown"
		  wp->SetText(MsgToken(765));
		  break;
		  
		case awNone:
		  // LKTOKEN [email protected]_ "None"
  		  wp->SetText(MsgToken(479));
		  break;

		case awYellow:
			// LKTOKEN [email protected]_ "YELLOW WARNING"
			wp->SetText(MsgToken(1255));
		  break;
		
开发者ID:LK8000,项目名称:LK8000,代码行数:66,代码来源:dlgAirspaceDetails.cpp

示例2: SetValues


//.........这里部分代码省略.........
    wp->SetText(buffer2);
    wp->RefreshDisplay();
  }
  
  // ONLY for DIAGNOSTICS- ENABLE ALSO XML
  #if 0
  wp = (WndProperty*)wf->FindByName(TEXT("prpWarnLevel"));
  if (wp) {
	  switch (airspace_copy.WarningLevel()) {
		default:
		  // LKTOKEN [email protected]_ "Unknown"
		  wp->SetText(gettext(TEXT("[email protected]_")));
		  break;
		  
		case awNone:
		  // LKTOKEN [email protected]_ "None"
  		  wp->SetText(gettext(TEXT("[email protected]_")));
		  break;

		case awYellow:
			// LKTOKEN [email protected]_ "YELLOW WARNING"
			wp->SetText(gettext(TEXT("[email protected]_")));
		  break;
		
		case awRed:
			// LKTOKEN [email protected]_ "RED WARNING"
			wp->SetText(gettext(TEXT("[email protected]_")));
		  break;
	  }//sw
	  wp->RefreshDisplay();
  }

  wp = (WndProperty*)wf->FindByName(TEXT("prpAckLevel"));
  if (wp) {
      if (airspace_copy.Enabled()) {
        switch (airspace_copy.WarningAckLevel()) {
          default:
            // LKTOKEN [email protected]_ "Unknown"
            wp->SetText(gettext(TEXT("[email protected]_")));
            break;
            
          case awNone:
            // LKTOKEN [email protected]_ "None"
            wp->SetText(gettext(TEXT("[email protected]_")));
            break;

          case awYellow:
              // LKTOKEN [email protected]_ "Yellow acknowledged"
              wp->SetText(gettext(TEXT("[email protected]_")));
            break;
          
          case awRed:
              // LKTOKEN [email protected]_ "Red acknowledged"
              wp->SetText(gettext(TEXT("[email protected]_")));
            break;

        }//sw
      } else {
          // LKTOKEN [email protected]_ "Disabled"
          wp->SetText(gettext(TEXT("[email protected]_")));
      }
	  wp->RefreshDisplay();
  }
  #endif

  wb = (WndButton*)wf->FindByName(TEXT("cmdFly"));
  if (wb) {
	if (airspace_copy.Flyzone()) {
	  // LKTOKEN [email protected]_ "NOFLY"
	  wb->SetCaption(gettext(TEXT("[email protected]_")));
	} else {
	  // LKTOKEN [email protected]_ "FLY"
	  wb->SetCaption(gettext(TEXT("[email protected]_")));
	}
	wb->Redraw();
  }

  wb = (WndButton*)wf->FindByName(TEXT("cmdSelect"));
  if (wb) {
	if (airspace_copy.Selected()) {
	  wb->SetCaption(gettext(TEXT("[email protected]_"))); // SELECTED!
	} else {
	  wb->SetCaption(gettext(TEXT("[email protected]_"))); // SELECT
	}
	wb->Redraw();
  }

  wb = (WndButton*)wf->FindByName(TEXT("cmdAcknowledge"));
  if (wb) {
    if (airspace_copy.Enabled()) {
      // LKTOKEN [email protected]_ "Disable"
      wb->SetCaption(gettext(TEXT("[email protected]_")));
    } else {
      // LKTOKEN [email protected]_ "Enable"
      wb->SetCaption(gettext(TEXT("[email protected]_")));
    }
    wb->Redraw();
  }

}
开发者ID:SergioDaSilva82,项目名称:LK8000,代码行数:101,代码来源:dlgAirspaceDetails.cpp


注:本文中的WndButton::Redraw方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。