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


C++ OnUpdate函数代码示例

本文整理汇总了C++中OnUpdate函数的典型用法代码示例。如果您正苦于以下问题:C++ OnUpdate函数的具体用法?C++ OnUpdate怎么用?C++ OnUpdate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: OnActiveButton

static void OnActiveButton(WndButton* pWnd){

  if (HoldOff ==0)
  {
    int res = dlgWayPointSelect(0, 90.0, 1, 3);
    if(res > RESWP_END )
    if(ValidWayPoint(res))
    {
      double  Frequency = StrToDouble(WayPointList[res].Freq,NULL);
      if(!ValidFrequency(Frequency))
      {
   // 	DoStatusMessage(_T("No valid Frequency!") );
	return;
      }
      devPutFreqActive(Frequency, WayPointList[res].Name);
      _stprintf(RadioPara.ActiveName,_T("%s"), WayPointList[res].Name);
      RadioPara.ActiveFrequency = Frequency;

      ActiveRadioIndex = res;
    }
    OnUpdate();
    HoldOff = HOLDOFF_TIME;
  }
}
开发者ID:LK8000,项目名称:LK8000,代码行数:24,代码来源:dlgRadioSettings.cpp

示例2: QSettings

//------------------------------------------------------------------------------
// OnBrowse
//
void WsdlFileView::OnBrowse()
{
  QString seedFile = QSettings().value(WsInfo().WsdlFileNameKey(m_host), QVariant()).toString();

  // Load file
  QString fileName = QFileDialog::getOpenFileName(this, QString("Select %1 WSDL File").arg(m_host), seedFile, "WSDL (*.wsdl);; All (*.*)");

  if (fileName.isEmpty())
    return;

  ui.WsdlFileNameLabel->setText(QFileInfo(fileName).fileName());
  ui.WsdlFileNameLabel->setToolTip(QDir::toNativeSeparators(fileName));

  if (HeaderContainerWidget* w = qobject_cast<HeaderContainerWidget*>(parent()->parent()))
  {
    w->Header()->SetTitle(QFileInfo(fileName).fileName());
    w->Header()->setToolTip(QDir::toNativeSeparators(fileName));
  }

  QSettings().setValue(WsInfo().WsdlFileNameKey(m_host), fileName);
  WsInfo().SetWsdlFile(m_host, fileName);
  m_wsdlFile = WsInfo().Wsdl(m_host);
  OnUpdate();
}
开发者ID:dpinney,项目名称:essence,代码行数:27,代码来源:WsdlFileView.cpp

示例3: memcpy

void CToolManagerHardDisk::InitDlgInfo(SDK_SystemFunction *pSysFunc, H264_DVR_DEVICEINFO *pDeviceInfo)
{
	memcpy(&m_systemFunction,pSysFunc,sizeof(SDK_SystemFunction));

	if (m_systemFunction.vEncodeFunction[SDK_ENCODE_FUNCTION_TYPE_SNAP_STREAM])
	{
	 GetDlgItem(IDC_BTN_SS)->ShowWindow(SW_SHOW);
	}
	else
	{
	 GetDlgItem(IDC_BTN_SS)->ShowWindow(SW_HIDE);
	}

	if (strcmp(pDeviceInfo->sSoftWareVersion, "V2.40.R06") >= 0)
	{
		EnableItems(TRUE);
	}
	else
	{
		EnableItems(FALSE);
	}

	OnUpdate();
}
开发者ID:chinajeffery,项目名称:cpp-surveillance-cli,代码行数:24,代码来源:ToolManagerHardDisk.cpp

示例4: QWidget

//------------------------------------------------------------------------------
// WsdlFileView
//
WsdlFileView::WsdlFileView(const QString& host, QWidget* parent)
  : QWidget(parent),
  m_host(host),
  m_wsdlFile(WsInfo().Wsdl(host))
{
  ui.setupUi(this);

  ui.TableView->setModel(&m_model);
  ui.TableView->horizontalHeader()->hide();
  ui.TableView->verticalHeader()->hide();
  ui.TableView->horizontalHeader()->setStretchLastSection(true);
  ui.TableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
  connect(ui.TableView, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(OnMethodDoubleClicked(const QModelIndex&)));

  ui.WsdlFileNameLabel->setText(QFileInfo(m_wsdlFile->FileName()).fileName());
  ui.WsdlFileNameLabel->setToolTip(QDir::toNativeSeparators(m_wsdlFile->FileName()));

  connect(ui.BrowseBtn, SIGNAL(clicked()), this, SLOT(OnBrowse()));
  connect(&m_model, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(OnModelChanged(QStandardItem*)));
  connect(m_wsdlFile, SIGNAL(WsdlMethodUpdated()), this, SLOT(OnWsdlMethodUpdated()));

  // force update after the m_wsdlFile has been parsed and instantiated in its constructor
  QTimer::singleShot(0, this, SLOT(OnUpdate()));
}
开发者ID:dpinney,项目名称:essence,代码行数:27,代码来源:WsdlFileView.cpp

示例5: ASSERT

void CModuleWnd::OnLibOpen() 
{
	ASSERT(m_pCurrentDocument == NULL);	//当前应处于库目录显示状态中
	AfxGetApp()->DoWaitCursor(1);

	//打开库文档
	POSITION pos = GetListCtrl()->GetFirstSelectedItemPosition();
	int index = GetListCtrl()->GetNextSelectedItem(pos);
	if (index < 0)
		return;
	TCHAR buffer[40];
	GetListCtrl()->GetItemText(index, 0, buffer, 40);
	CString strName = buffer;

	CModuleDoc* pDoc = new CModuleDoc();
	if (pDoc == NULL)
		AfxThrowMemoryException();
	pDoc->OpenLib(strName);
	
	//设置新图标大小
//	GetListCtrl()->SetImageList(&m_ImageContentSmall, LVSIL_SMALL);
//	GetListCtrl()->SetImageList(&m_ImageContentLarge, LVSIL_NORMAL);

	//更新显示
	m_pCurrentDocument = pDoc;

	//改变图标
	GetListCtrl()->SetImageList(&m_pCurrentDocument->m_listImage, LVSIL_SMALL);
	GetListCtrl()->SetImageList(&m_pCurrentDocument->m_listImageLarge, LVSIL_NORMAL);

	OnUpdate();
	DoCommand(-1);

	AfxGetApp()->DoWaitCursor(-1);

}
开发者ID:JackWangCUMT,项目名称:SuperCxHMI,代码行数:36,代码来源:ModuleWnd.cpp

示例6: OnUpdate

void Window::Update(float elapsed)
{
    if (IsDone())
    {
        return;
    }

    OnUpdate(elapsed);

    WindowList doneChildren;
    for (WindowList::iterator iter = m_children.begin(); iter != m_children.end(); ++iter)
    {
        const boost::shared_ptr<Window> child(*iter);
        if (child->IsDone())
        {
            doneChildren.push_back(child);
        }
    }

    for (WindowList::iterator iter = doneChildren.begin(); iter != doneChildren.end(); ++iter)
    {
        m_children.erase(find(m_children.begin(), m_children.end(), *iter));
    }
}
开发者ID:FooSoft,项目名称:moonfall,代码行数:24,代码来源:Window.cpp

示例7: OnInput

    void SDLWrapper::OnExecute( )
    {
        // Frame starts
        //
        double startTime = m_timer->GetElapsedTime( );

        // Input
        //
        OnInput( );

        // Update
        //
        OnUpdate( );

        // Draw
        //
        OnRender( );


        // Time Management
        //
        double endTime = m_timer->GetElapsedTime( );
        double nextTimeFrame = startTime + DESIRED_FRAME_TIME;

        while( endTime < nextTimeFrame )
        {
            // Spin lock
            //
            endTime = m_timer->GetElapsedTime( );
        }

        // Frame ends
        //
        ++m_nUpdates;
        m_deltaTime = m_nUpdates / static_cast< double >( DESIRED_FRAME_RATE );
    }
开发者ID:raydelto,项目名称:GeometryWars,代码行数:36,代码来源:SDLWrapper.cpp

示例8: OnUpdate

void CPlayerView::OnTimer(UINT nIDEvent) 
{
	OnUpdate( this,0 , NULL );

	if ( IDLE == m_nStatus )
	{
		m_nCurrentTime = 0;
		m_Position.SetPos( m_nCurrentTime );
	}

	if ( PLAYING == m_nStatus )
	{
		if ( m_pPlayStream )
		{
			m_nCurrentTime = (	m_pPlayStream->GetCurrentTime() + 
								m_dwSeekOffset );
		}

		m_Position.SetRange( 0, m_nTotalTime );
		m_Position.SetPos( m_nCurrentTime );
	}

	SetControls();
}
开发者ID:joshlong,项目名称:libcd,代码行数:24,代码来源:PlayerView.cpp

示例9: OnUpdate

void
FieldView::SetReferencePoint(unsigned which)
{
	mCurrentReferencePoint = which;
	OnUpdate(this);
}
开发者ID:superoven,项目名称:calchart,代码行数:6,代码来源:field_view.cpp

示例10: RegisterWindowClass

int Luxko::Application::BaseApp::Run(HINSTANCE hInstance, int nCmdShow)
{
	//**********************************************************************
	// @Luxko: 1stly, register the window class.
	//			This job is delegates to the virtual function RegisterWindowClass.
	auto windowClass = RegisterWindowClass(hInstance);
	if (windowClass == NULL) {
		throw "Window class Registration failed!";
	}
	//**********************************************************************


	//**********************************************************************
	// @Luxko: 2ndly, create a window instance with the help of a WindowDescriptor,
	//			which encapsulates essential details for D3D window creation.
	WindowDescriptor wd(WindowStyle::OverlappedWindow, ExtendedWindowStyle::OverlappedWindow,
		0, 0,_width,_height);
	_hWindow = wd.GenerateWindowByATOM(hInstance, windowClass, _title);
	if (_hWindow == NULL) {
		throw "Window Creation Fucking failed!";
	}
	//**********************************************************************
	// @Luxko: Do the initialization necessary for the application.

	OnInit();
	//**********************************************************************
	// @Luxko: Now we're ready to show the window.
	ShowWindow(_hWindow, nCmdShow);
	//UpdateWindow(_hWindow);
	//**********************************************************************

	//**********************************************************************
	// @Luxko: Do the initialization necessary for the application.
	//OnInit();

	//**********************************************************************

	//**********************************************************************
	// @Luxko: go to the main loop.
	MSG msg = { 0 };
	while (true) {
		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
			TranslateMessage(&msg);
			DispatchMessage(&msg);

			if (msg.message == WM_QUIT) {
				break;
			}

			OnEvent(msg);
		}

		else {
			OnUpdate();
			OnRender();
		}
	}

	OnDestroy();
	//**********************************************************************

	//**********************************************************************
	// @Luxko: the returned value is the wParam of the last received
	//			WM_QUIT message.
	return static_cast<char>(msg.wParam);
	//**********************************************************************
}
开发者ID:DaseinPhaos,项目名称:AnuthurEngine,代码行数:67,代码来源:ApplicationBase.cpp

示例11: OnUpdate

void CUIBase::Update(float fDeltaTime, ULONG ElapsedTime)
{
    OnUpdate(fDeltaTime, ElapsedTime);
    UpdateChild(fDeltaTime, ElapsedTime);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:5,代码来源:UIBase.cpp

示例12: OnUpdate

int KRepresentMissileProcessor::Update(double fTime, double fTimeLast)
{
	return OnUpdate(fTime, fTimeLast);
}
开发者ID:1suming,项目名称:pap2,代码行数:4,代码来源:krepresentmissileprocessor.cpp

示例13: RETURN_IF_EQUAL

void IScrollMathModel::SetDirection(ScrollDirection val)
{
	RETURN_IF_EQUAL(mDirection, val);
	mDirection = val;
	OnUpdate();
}
开发者ID:johndpope,项目名称:Medusa,代码行数:6,代码来源:IScrollMathModel.cpp

示例14: KillTimer

void CPhotoPubView::OnTimer(UINT_PTR nIDEvent)
{
	KillTimer(1);
	CPhotoPubDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	// TODO: Add your message handler code here and/or call default
	int nFiles=m_CurFiles.size();
	set<CString> CurFiles1;
	const int nFiles1=GetAllFolderFile(m_WatchingPath, "*.jpg", CurFiles1);
	if (nFiles==nFiles1) {
		SetTimer(1,500,NULL);
		return;
	}else if (nFiles>nFiles1){
		AfxMessageBox("同步发生错误,无法恢复,请重新运行!\n");
		exit(1);
	}
	
	//Here Comes a new Photo
	//wait transfering
	Sleep(1000);
	//process
	set<CString>::iterator it1;
	for (it1=CurFiles1.begin();it1!=CurFiles1.end();++it1)
	{
		if ( m_CurFiles.find(*it1)==m_CurFiles.end() ) //not exist before
		{
			((CMainFrame*)GetParent())->ShowWindow(SW_SHOWMAXIMIZED);

			CClientDC cdc(this);
			CRect clrct;
			GetClientRect(&clrct);
			int width=clrct.Width();
			int height=clrct.Height();

			if (pDoc->m_pOpenedImage) ReleaseFImage(&pDoc->m_pOpenedImage);
			IplImage *pImg=pDoc->m_pOpenedImage=LoadFImage(m_WatchingPath+"\\"+*it1+".jpg");
			m_ratio=min(double(width)/pImg->width,double(height)/pImg->height);
			((CMainFrame*)GetParent())->SetRatio(int(m_ratio*100));
			OnUpdate(NULL,NULL,NULL);
			DrawImage(&cdc,pImg);

			CString newname;
			int res;
			do {
				GetNewName(m_InitStr,newname);
				res=rename(m_WatchingPath+"\\"+*it1+".jpg",m_WatchingPath+"\\"+newname+".jpg");
			}while( 
				(res==0) ? false : (true,
					(errno==EEXIST) ? AfxMessageBox("文件名重复!请重试"): (
						(errno==EINVAL) ? AfxMessageBox("文件名含非法字符!请重试"):AfxMessageBox("未知错误!请重试")
				) ) );
			m_CurFiles.insert(newname);
			m_InitStr=newname;
			CStringNumber snum(m_InitStr);
			snum.Increase();
			snum.ToString(m_InitStr);
			//break;
		}
	}
	
	CScrollView::OnTimer(nIDEvent);

	SetTimer(1,500,NULL);
}
开发者ID:ysomebody,项目名称:photopub,代码行数:65,代码来源:PhotoPubView.cpp

示例15: OnUpdate

void CActivityView::OnInitialUpdate()
{
	CScrollView::OnInitialUpdate();

	OnUpdate(NULL,0,NULL);
}
开发者ID:Anonymousvn,项目名称:bigbrother,代码行数:6,代码来源:ActivityView.cpp


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