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


C++ UpdateDisplay函数代码示例

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


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

示例1: DlgProc

    virtual BOOL DlgProc(TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
    {
        int id = LOWORD(wParam);
        int code = HIWORD(wParam);

        IParamBlock2 *pb = map->GetParamBlock();
        HWND cbox = NULL;

        switch (msg)
        {
        case WM_INITDIALOG:
            int i;
            for (i = 0; i < plMAXCameraLayer::kMaxUVSrc; i++)
            {
                cbox = GetDlgItem(hWnd, IDC_CAM_LAYER_UV_SRC);
                SendMessage(cbox, CB_ADDSTRING, 0, (LPARAM)plMAXCameraLayer::kUVStrings[i]);
            }
            UpdateDisplay(map);
            return TRUE;

        case WM_COMMAND:
            if (id == IDC_CAM_LAYER_UV_SRC)
            {
                pb->SetValue(plMAXCameraLayer::kUVSource, t, SendMessage(GetDlgItem(hWnd, id), CB_GETCURSEL, 0, 0));
                return TRUE;
            }
            else if (id == IDC_CAM_LAYER_EXPLICIT_CAM)
            {
                UpdateDisplay(map);
                return TRUE;
            }
            break;
        }
        return FALSE;
    }
开发者ID:Asteral,项目名称:Plasma,代码行数:35,代码来源:plMAXCameraLayer.cpp

示例2: ProcessHexCommand

void ProcessHexCommand(SHORT comm)
{
   double       temp;

    if (bShiftMode) {
        bShiftMode = FALSE;
        WinSetWindowText(hwndSmode, "");

        EntryToStackHex();
        bLift = TRUE;

        switch (comm ) {
        case K_BS: /* CLx */
           if (bError) {
              UpdateDisplay(stack[0]);
           } else {
              UpdateDisplay(0.0);
              bLift = FALSE;
           } /* endif */
           break;
        case K_DOT: /* lastx */
           LiftStack();
           UpdateDisplay(lastx);
           break;
        default:
        }
    } else {
开发者ID:OS2World,项目名称:APP-CALCULATOR-HPCalc,代码行数:27,代码来源:hex-oct.c

示例3: GetTrianglePoints

/*
 * Function: GetTrianglePoints
 * Usage: GetTrianglePoints(tri)
 * -----------------------------------
 * This function watches the user click three points on the Graphics Console.
 * The function notes the location of those points by loading the 'tri' array
 * with three pointT structs.
 * The function connects the dots to create a triangle on the screen.
 * Graphics should already be initialized.  We assume working with triangles,
 * but the constant nPOINTS will let us see if this works for four points.
 */
void GetTrianglePoints(pointT tri[]) {
    int pt_ct = 0;
    while ( pt_ct < nPOINTS ) {
        //cout << "got to this point" << endl;
        WaitForMouseDown();
        WaitForMouseUp();
        tri[pt_ct].xp = GetMouseX();
        tri[pt_ct].yp = GetMouseY();
        if ( pt_ct == 0 )
        {
            MovePen(tri[0].xp, tri[0].yp);
        }
        else
        {
            DrawLine(
                (tri[pt_ct].xp - tri[pt_ct - 1].xp ),
                (tri[pt_ct].yp - tri[pt_ct - 1].yp )
                    );
        }
        UpdateDisplay();
        pt_ct ++;
    }

    // Connect the third and first points of the triangle with lines
    DrawLine(
        (tri[0].xp - tri[nPOINTS - 1].xp ),
        (tri[0].yp - tri[nPOINTS - 1].yp )
            );
    UpdateDisplay();
}
开发者ID:bjhw,项目名称:bjcpphw,代码行数:41,代码来源:q3_graphics.cpp

示例4: ProcessPin

/*
 * ProcessPin
 * Description:      Process the entered Pin Number.
 *                   
 * Arguments:        nextstate- expected next state
 *                   event    - current event
 * Return:           nextstate- next state assuming unverified pin.
 *
 * Input:            None
 * Output:           None
 *
 * Operation:        If the pin number is complete, verify the pin number. A
 *                   verified pin number means the FSM can move on to "Home"
 *                   
 * Error Handling:   None
 *
 * Algorithms:       None
 * Data Strutures:   None
 *
 * Shared Variables: None
 *
 * Revision History:
 *   Apr. 23, 2013      Nnoduka Eruchalu     Initial Revision
 */
state ProcessPin(state nextstate, eventcode event)
{
  state result = nextstate;
  if (num_digits == NUM_PIN_DIGITS) { /* if pin number is complete */
    
    /* let user know the pin is being verified */
    UpdateDisplay(1, 0, "                    "); /* row 1, col 0   */
    UpdateDisplay(2, 0, "   Verifying Pin    "); /* row 2, col 0   */
    UpdateDisplay(3, 0, "                    "); /* row 3, col 0   */
    
    /*TODO: Use DataPinValidate(uid_easycard, number) */
    if (TRUE) { /* and if is verified, the   */
      __delay_s(0.5);   /* delay to mimic verfication. TODO: remove */
      result = STATE_HOME;         /* nextstate is the homepage */
      /* flash success message */
      UpdateDisplay(2, 0, "   Sucessful Pin!   "); /* row 2, col 0 */
          
    } else {                          /* if pin number is invalid  */
       result = STATE_WELCOME;        /* go back to welcome page   */
      /* flash error message */
      UpdateDisplay(2, 0, "    Invalid  Pin!   "); /* row 2, col 0 */
    }
    
    __delay_s(MSG_FLASH_TIME);        /* a msg flash takes time    */
    ClearNumber();                    /* clear pin since it was complete */
  } 
  
  return result;
}
开发者ID:nceruchalu,项目名称:easypay,代码行数:53,代码来源:eventproc.c

示例5: MobileGet

/*
 * MobileGet
 * Description:      Function for getting mobile topup of a specific amount
 *                   
 * Arguments:        amount: value of mobile recharge to process (in Naira)
 * Return:           None.
 *
 * Input:            None
 * Output:           None
 *
 * Operation:        Flash success message before returning home
 *
 * Error Handling:   None
 *
 * Algorithms:       None
 * Data Strutures:   None
 *
 * Shared Variables: None
 *
 * Revision History:
 *   Apr. 24, 2013      Nnoduka Eruchalu     Initial Revision
 *   Apr. 25, 2013      Nnoduka Eruchalu     Added DisplayMoney
 */
static void MobileGet(uint32_t amount)
{
   /* update LCD */
  UpdateDisplay(1, 0, "                    "); /* row 1, col 0   */
  UpdateDisplay(2, 0, " Successful Top-Up  "); /* row 2, col 0   */
  UpdateDisplay(3, 0, "+                   "); /* row 3, col 0   */
  DisplayMoney(3, 1, amount*100);              /* show amount of topup   */
  balance -= amount*100;                       /* update balance. */
  __delay_s(MSG_FLASH_TIME);                   /* a msg flash takes time */
}
开发者ID:nceruchalu,项目名称:easypay,代码行数:33,代码来源:eventproc.c

示例6: UpdateDisplay

void CEventWizardDlg::OnFilterChange()
{
	m_bOK = false;

	m_Find.GetWindowText(m_Filter);
	m_Filter.MakeLower();

	if (m_iStep == 1)
	{
		int Sel = m_List.GetSelectedItem();
		CString Name = m_List.GetItemText(Sel, NULL); // Previously selected name

		// Clear list
		m_List.DeleteAllItems();
		
		UpdateDisplay(Name);

		if (m_List.GetItemCount() == 1)
		{
			m_List.SetItemState(0, LVIS_SELECTED, LVIS_SELECTED);
			m_List.Invalidate();
			UpdateButtons();
		}
		else
		{
			// We work out which is the best possible one to select


		}
	}

	else if (m_iStep == 2)
	{
		int curSel = m_ACEList.GetSelectedItem();
		CString name = m_ACEList.GetItemText(curSel,NULL);

		// Clear list
		m_ACEList.DeleteAllItems();
		m_ACEList.RemoveAllGroups();
	
		UpdateDisplay(name, false);

		m_ACEList.EnableGroups();

		if (m_ACEList.GetItemCount() == 1)
		{
			m_ACEList.SetItemState(0, LVIS_SELECTED, LVIS_SELECTED);
			m_ACEList.Invalidate();
			UpdateButtons();
		}
	} 

	m_Find.SetFocus();
}
开发者ID:DavidPulido,项目名称:Contruct,代码行数:54,代码来源:Event+Wizard+-+Filter.cpp

示例7: GetClientRect

void CChineseChessView::OnLButtonUp(UINT nFlags, CPoint point)
{
	// TODO: ÔÚ´ËÌí¼ÓÏûÏ¢´¦Àí³ÌÐò´úÂëºÍ/»òµ÷ÓÃĬÈÏÖµ
	if (isMouseDown){
		isMouseDown=false;		
		CRect rect;
		GetClientRect(&rect);

		CPoint logpoint=PhysicalToLogicPoint(point);
		if (logpoint.x>=0){	
			//human move
			Gen();
			newmove.from = LogicPointToNum(selectedPoint); 
			newmove.dest = LogicPointToNum(logpoint);
			for (int i=gen_begin[ply]; i<gen_end[ply]; i++){
				if (gen_dat[i].m.from==newmove.from && gen_dat[i].m.dest==newmove.dest){
					if(UpdateNewMove()){
						UpdateDisplay(rect);
						int ret;
						ret=MessageBox("you are really a lucky dog,dare to try again?","Game Over",MB_YESNO);
						if (ret==IDYES){
							NewGame(true);
							return;
						}else{
							exit(0);
						}
					}
					side = xside; xside = 1-xside;
					//computer move
					short best;			
					best = AlphaBeta(-INFINITY, INFINITY, MAX_PLY);
					if(UpdateNewMove()){
						UpdateDisplay(rect);
						int ret;
						ret=MessageBox("afraid?dare to try again?","Game Over",MB_YESNO);
						if (ret==IDYES){
							NewGame(true);
							return;
						}else{
							exit(0);
						}
					}
					side = xside; xside = 1-xside;
					break;
				}
			}
			
		}

		UpdateDisplay(rect);
		
	}
	CView::OnLButtonUp(nFlags, point);
}
开发者ID:Sirien,项目名称:ChineseChess-1,代码行数:54,代码来源:ChineseChessView.cpp

示例8: GetFileBrowser

void
JXSaveFileDialog::Receive
	(
	JBroadcaster*	sender,
	const Message&	message
	)
{
	JXDirTable* fileBrowser = GetFileBrowser();

	if (sender == itsFileNameInput)
		{
		if (message.Is(JXWidget::kGotFocus))
			{
			itsSaveButton->SetLabel(kSaveLabel);
			UpdateDisplay();
			}
		else if (message.Is(JXWidget::kLostFocus))
			{
			itsSaveButton->SetLabel(kOpenLabel);
			UpdateDisplay();
			}
		else if (message.Is(JTextEditor::kTextChanged) ||
				 message.Is(JTextEditor::kTextSet))
			{
			UpdateDisplay();
			}
		}

	else if (sender == fileBrowser && message.Is(JXDirTable::kFileDblClicked))
		{
		const JXDirTable::FileDblClicked* info =
			dynamic_cast<const JXDirTable::FileDblClicked*>(&message);
		assert( info != NULL );
		const JString fileName = (info->GetDirEntry()).GetName();
		itsFileNameInput->SetText(fileName);
		itsFileNameInput->Focus();
		}

	else
		{
		if (sender == &(fileBrowser->GetTableSelection()))
			{
			UpdateDisplay();
			}
		else if (sender == fileBrowser &&
				 (message.Is(JXWidget::kGotFocus) ||
				  message.Is(JXWidget::kLostFocus)))
			{
			UpdateDisplay();
			}

		JXCSFDialogBase::Receive(sender, message);
		}
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:54,代码来源:JXSaveFileDialog.cpp

示例9: UpdateDisplay

void CDlgCalcDlg::DisplayXRegister()
{
    double dblVal = m_dblStack[0];

    if ((dblVal >= 1000000000000.0) || (dblVal <= -1000000000000.0)) {
        UpdateDisplay (CString (_T ("Overflow error")));
        m_bErrorFlag = TRUE;
        MessageBeep (MB_ICONASTERISK);
    }
    else {
        m_strDisplay.Format (m_strFormat, dblVal);
        UpdateDisplay (m_strDisplay);
    }
}
开发者ID:jiayuehua,项目名称:MFCProgramming,代码行数:14,代码来源:DlgCalcDlg.cpp

示例10: GetNextItem

void DraggableListCtrl::OnChar(wxKeyEvent& event)
{
	// Don't respond to the keyboard if the user is dragging things (else
	// the undo system might get slightly confused)
	if (HasCapture())
		return;

	if (event.GetKeyCode() == WXK_DELETE)
	{
		long item = GetNextItem(-1,
				wxLIST_NEXT_ALL,
				wxLIST_STATE_SELECTED);

		if (item != -1)
		{
			AtlasWindowCommandProc::GetFromParentFrame(this)->Submit(
				new DeleteCommand(this, item)
			);
			UpdateDisplay();
		}
	}
	else
	{
		event.Skip();
	}
}
开发者ID:Marlinc,项目名称:0ad,代码行数:26,代码来源:DraggableListCtrl.cpp

示例11: if

LRESULT CDlgScraperOutput::OnWinMgr(WPARAM wp, LPARAM lp) 
{
	NMWINMGR& nmw = *(NMWINMGR*)lp;
	RECT		rect = {0};

	if (nmw.code==NMWINMGR::GET_SIZEINFO) 
	{
		if (wp==(WORD)GetDlgCtrlID()) 
		{
			// Parent frame is requesting my size info. Report min size.
			m_winMgr.GetMinMaxInfo(this, nmw.sizeinfo);
			return true; // handled--important!
		}
	}

	else if (nmw.code==NMWINMGR::SIZEBAR_MOVED) 
	{
		// User moved a sizer bar: call WinMgr to do it!
		m_winMgr.MoveRect(wp, nmw.sizebar.ptMoved, this);
		m_winMgr.SetWindowPositions(this);
		if (!in_startup)
		{
			m_Zoom.GetWindowRect(&rect);
			m_Zoom.SetWindowPos(NULL, 0, 0, rect.right-rect.left, 9999, SWP_NOMOVE);
			UpdateDisplay();
		}
		return true;
	}

	return false; // not handled
}
开发者ID:buranela,项目名称:OpenHoldemV12,代码行数:31,代码来源:DialogScraperOutput.cpp

示例12: DisplayMoney

/*
 * DisplayMoney
 * Description:      At the specified row and column, write a monetary value
 *                   that is supplied in kobos.
 *                   Example: n = 123456 becomes N1,234.56
 *                            n = 0      becomes N0.00
 *
 * Arguments:        row: 0-indexed LCD row
 *                   col: 0-indexed LCD column
 *                   n:   monetary amount in kobos
 * Return:           None
 *
 * Input:            None
 * Output:           None
 *
 * Operation:        Write exactly 2 digits after a decimal point, and at least
 *                   1 digit before the decimal point. To ensure you get a
 *                   digit before decimal point, use a do-while loop so that
 *                   even if the number starts out as 0, it is written at least
 *                   once.
 *
 * Error Handling:   None
 *
 * Algorithms:       None
 * Data Strutures:   None
 *
 * Shared Variables: None
 *
 * Revision History:
 *   Apr. 25, 2013      Nnoduka Eruchalu     Initial Revision
 */
static void DisplayMoney(uint8_t row, uint8_t col, uint32_t n)
{
  char retbuf[30];                    /* allocate space for writing string    */
  char *p = &retbuf[sizeof(retbuf)-1];/* and prepare to start from end        */
  int i = 0;                          /* counter of chars written             */
  
  
  *p = '\0';                          /* strings end with a null terminator   */
  
  do {                                /* pre-decimal point loop               */
    *--p = '0' + (n % 10);            /* save next char in ASCII by adding '0'*/
    n /= 10;                          /* and drop the saved char from number  */
    i++;                              /* 1 more digit written                 */
  } while(i<2);                       /* write at least 2 digits b4 decimal pt*/
  *--p = '.';                         /* write decimal point                  */
  i = 0;                              /* and reset counter for next loop      */
  
  do {                                /* comma insertion loop                 */
    if ((i%3 == 0) && (i != 0)) {     /* if on a 3rd digit                    */
      *--p = ',';                     /* then next character is a comma       */
    }
    *--p = '0' + (n % 10);            /* save next char in ASCII by adding '0'*/
    n /= 10;                          /* and drop the saved char from number  */
    i++;                              /* 1 more digit written                 */
  } while (n != 0);                   /* keep going till number is exhausted  */
  
  *--p = NAIRA_CHAR;                  /* throw in currency logo               */
  
  UpdateDisplay(row, col, p);         /* FINALLY, update display              */
}
开发者ID:nceruchalu,项目名称:easypay,代码行数:61,代码来源:eventproc.c

示例13: UpdateDisplay

/// Set the attributes and optionally update the display
bool wxRichTextFormattingDialog::SetStyle(const wxRichTextAttr& style, bool update)
{
    m_attributes = style;
    if (update)
        UpdateDisplay();
    return true;
}
开发者ID:HanruZhou,项目名称:wxWidgets,代码行数:8,代码来源:richtextformatdlg.cpp

示例14: UpdateDisplay

void CChineseChessView::OnMouseMove(UINT nFlags, CPoint point)
{
	// TODO: ÔÚ´ËÌí¼ÓÏûÏ¢´¦Àí³ÌÐò´úÂëºÍ/»òµ÷ÓÃĬÈÏÖµ
	if (isMouseDown){
		CPoint dragPoint=pieceDragPoint+point-lastMousePoint;
		CRect rc;
		if (dragPoint.x>=pieceDragPoint.x){
			rc.right=dragPoint.x+icon_len;
			rc.left=pieceDragPoint.x;
		}else{
			rc.right=pieceDragPoint.x+icon_len;
			rc.left=dragPoint.x;
		}
		if (dragPoint.y>=pieceDragPoint.y){
			rc.bottom=dragPoint.y+icon_len;
			rc.top=pieceDragPoint.y;
		}else{
			rc.bottom=pieceDragPoint.y+icon_len;
			rc.top=dragPoint.y;
		}
		pieceDragPoint=dragPoint;
		lastMousePoint=point;
		UpdateDisplay(rc);
	}
	
	CView::OnMouseMove(nFlags, point);
}
开发者ID:Sirien,项目名称:ChineseChess-1,代码行数:27,代码来源:ChineseChessView.cpp

示例15: UpdateDisplay

void PostCounter::setTimescaleMode(RDLogLine::TimescaleMode mode)
{
  if(mode!=post_timescale_mode) {
    post_timescale_mode=mode;
    UpdateDisplay();
  }
}
开发者ID:kevinsikes,项目名称:rivendell,代码行数:7,代码来源:post_counter.cpp


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