• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ BUTTON_SetText函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _ShowMessageBox

/**
  * @brief  Show Message Box
  * @param  hWin:   pointer to the parent handle
  * @param  pTitle: pointer to the title
  * @param  pText:  pointer to the text
  * @retval int 
  */ 
static int _ShowMessageBox(WM_HWIN hWin, const char* pTitle, const char* pText, int YesNo)
{
  WM_HWIN hFrame, hClient, hBut;
  int r = 0;
  /* Create frame win */
  hFrame = FRAMEWIN_CreateEx(25, 82, 190, 90, hWin, WM_CF_SHOW, FRAMEWIN_CF_MOVEABLE, 0, pTitle, &_cbMessageBox);
  FRAMEWIN_SetClientColor   (hFrame, GUI_WHITE);
  FRAMEWIN_SetFont          (hFrame, &GUI_Font16B_ASCII);
  FRAMEWIN_SetTextAlign     (hFrame, GUI_TA_HCENTER);
  /* Create dialog items */
  hClient = WM_GetClientWindow(hFrame);
  TEXT_CreateEx(10, 7, 170, 30, hClient, WM_CF_SHOW, GUI_TA_HCENTER, 0, pText);
  
  if (YesNo) {
    hBut = BUTTON_CreateEx(97, 45, 55, 18, hClient, WM_CF_SHOW, 0, GUI_ID_CANCEL);
    BUTTON_SetText        (hBut, "No");
    hBut = BUTTON_CreateEx(32, 45, 55, 18, hClient, WM_CF_SHOW, 0, GUI_ID_OK);
    BUTTON_SetText        (hBut, "Yes");
  } else {
    hBut = BUTTON_CreateEx(64, 45, 55, 18, hClient, WM_CF_SHOW, 0, GUI_ID_OK);
    BUTTON_SetText        (hBut, "Ok");
  }
  
  WM_SetFocus(hFrame);  
  WM_MakeModal(hFrame);
  r = GUI_ExecCreatedDialog(hFrame);  
  return r;
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:35,代码来源:filebrowser_win.c


示例2: MainTask

/*********************************************************************
*
*       MainTask
*/
void MainTask(void) {
  FRAMEWIN_Handle hWinVideo;
  BUTTON_Handle hBut;
  GUI_Init();
  WM_SetCallback(WM_HBKWIN, _cbBkWin);
  /* Create buttons */
  hBut = BUTTON_CreateEx(240,  5, 75, 18, WM_HBKWIN, WM_CF_SHOW, 0, GUI_ID_BUTTON0);
  BUTTON_SetText(hBut, "Create win");
  hBut = BUTTON_CreateEx(240, 25, 75, 18, WM_HBKWIN, WM_CF_SHOW, 0, GUI_ID_BUTTON1);
  BUTTON_SetText(hBut, "Delete win");
  hBut = BUTTON_CreateEx(240, 45, 75, 18, WM_HBKWIN, WM_CF_SHOW, 0, GUI_ID_BUTTON2);
  BUTTON_SetText(hBut, "Show win");
  hBut = BUTTON_CreateEx(240, 65, 75, 18, WM_HBKWIN, WM_CF_SHOW, 0, GUI_ID_BUTTON3);
  BUTTON_SetText(hBut, "Hide win");
  /* Create framewin video */
  hWinVideo = FRAMEWIN_CreateEx(5, 5, 170, 120, 0, WM_CF_SHOW, FRAMEWIN_CF_MOVEABLE, 0, "Video window", _cbFrameWinVideo);
  FRAMEWIN_SetClientColor(hWinVideo, GUI_INVALID_COLOR);
  /* Create test windows */
  _CreateWindow();
  _CreateWindow();
  _CreateWindow();
  while (1) {
    GUI_Delay(1000);
  }
}
开发者ID:caicry,项目名称:uFrame,代码行数:29,代码来源:WM_Video.c


示例3: _ToggleFullScreenMode

/*********************************************************************
*
*       _ToggleFullScreenMode
*
* Purpose:
*   This routine switches between full screen mode and normal mode by hiding or showing the
*   widgets of the dialog, enlarging/shrinking the graph widget and modifying some other
*   attributes of the dialog widgets.
*/
static void _ToggleFullScreenMode(WM_HWIN hDlg) {
  static int FullScreenMode;
  static GUI_RECT Rect;
  static unsigned ScalePos;
  WM_HWIN hGraph, hButton;
  hGraph  = WM_GetDialogItem(hDlg, GUI_ID_GRAPH0);
  hButton = WM_GetDialogItem(hDlg, GUI_ID_BUTTON0);
  FullScreenMode ^= 1;
  if (FullScreenMode) {
    /* Enter the full screen mode */
    WM_HWIN hClient;
    GUI_RECT RectInside;
    hClient = WM_GetClientWindow(hDlg);
    BUTTON_SetText(hButton, "Back");
    WM_MoveWindow(hButton, 0, 11);
    FRAMEWIN_SetTitleVis(hDlg, 0);
    WM_GetInsideRectEx(hClient, &RectInside);
    WM_GetWindowRectEx(hGraph, &Rect);
    WM_ForEachDesc(hClient, _ForEach, &FullScreenMode); /* Hide all descendants */
    WM_SetWindowPos(hGraph, WM_GetWindowOrgX(hClient), WM_GetWindowOrgX(hClient), RectInside.x1, RectInside.y1);
    ScalePos = GRAPH_SCALE_SetPos(_hScaleH, RectInside.y1 - 105);
  } else {
    /* Return to normal mode */
    BUTTON_SetText(hButton, "Full Screen");
    WM_MoveWindow(hButton, 0, -11);
    WM_ForEachDesc(WM_GetClientWindow(hDlg), _ForEach, &FullScreenMode); /* Show all descendants */
    WM_SetWindowPos(hGraph, Rect.x0, Rect.y0, Rect.x1 - Rect.x0 + 1, Rect.y1 - Rect.y0 + 1);
    FRAMEWIN_SetTitleVis(hDlg, 1);
    GRAPH_SCALE_SetPos(_hScaleH, ScalePos);
  }
}
开发者ID:caicry,项目名称:uFrame,代码行数:40,代码来源:WIDGET_GraphXY.c


示例4: _ShowDemo

/*********************************************************************
*
*       _ShowDemo
*/
static void _ShowDemo(void) {
  WM_HWIN hWin0;
  WM_HWIN hWin1;
  WM_HWIN hWin2;
  WM_HWIN hFrame1;
  WM_HWIN hFrame2;
  WM_HWIN hClient1;
  WM_HWIN hClient2;

  WM_SetCallback(WM_HBKWIN, _cbBkWin);
  hFrame1  = FRAMEWIN_CreateEx( 10, 30, 140, 140, 0, WM_CF_SHOW, FRAMEWIN_CF_MOVEABLE, 0, "Early Clipping", _cbFrameWin1);
  hFrame2  = FRAMEWIN_CreateEx(170, 30, 140, 140, 0, WM_CF_SHOW, FRAMEWIN_CF_MOVEABLE, 0, "Late Clipping", _cbFrameWin2);
  hClient1 = WM_GetClientWindow(hFrame1);
  hClient2 = WM_GetClientWindow(hFrame2);
  _hWin1   = WM_CreateWindowAsChild(0, 0, WM_GetWindowSizeX(hClient1), WM_GetWindowSizeY(hClient1), hClient1, WM_CF_SHOW, _cbFrameWin1, 0);
  _hWin2   = WM_CreateWindowAsChild(0, 0, WM_GetWindowSizeX(hClient2), WM_GetWindowSizeY(hClient2), hClient2, WM_CF_SHOW | WM_CF_LATE_CLIP, _cbFrameWin2, 0);
  _hBut1   = BUTTON_CreateEx( 10, 210, 140, 20, 0, WM_CF_SHOW, 0, 1);
  _hBut2   = BUTTON_CreateEx(170, 210, 140, 20, 0, WM_CF_SHOW, 0, 2);
  hWin0    = FRAMEWIN_CreateEx( 60,  80, 40, 40, 0, WM_CF_SHOW | WM_CF_STAYONTOP, FRAMEWIN_CF_MOVEABLE, 0, "Top 0", _cbTop);
  hWin1    = FRAMEWIN_CreateEx(220,  80, 40, 40, 0, WM_CF_SHOW | WM_CF_STAYONTOP, FRAMEWIN_CF_MOVEABLE, 0, "Top 1", _cbTop);
  hWin2    = FRAMEWIN_CreateEx(140, 170, 40, 40, 0, WM_CF_SHOW | WM_CF_STAYONTOP, FRAMEWIN_CF_MOVEABLE, 0, "Top 2", _cbTop);
  FRAMEWIN_SetResizeable(hWin0, 1);
  FRAMEWIN_SetResizeable(hWin1, 1);
  FRAMEWIN_SetResizeable(hWin2, 1);
  BUTTON_SetText(_hBut1, "Invalidate");
  BUTTON_SetText(_hBut2, "Reset counters");
  while(1) {
    GUI_Delay(50);
  }
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:34,代码来源:WM_LateClipping.c


示例5: TestCom

 void TestCom(WM_MESSAGE * pMsg,ETestMode etest_mode_in)
 {
	 int lenth;
	 char buf[10];
	 etest_mode = etest_mode_in;

     if(etest_mode == TEST_MODE_COM)
	 {
	 _ListBox[1]="C";
	 }else if(etest_mode == TEST_MODE_T)
	 {
	 _ListBox[1]="T";
	 }else{
	 _ListBox[1]="S";
	 }

	  if(ttpars.dir == 2)
	  {
	  _ListBox[2] = "D";
	   }else{
	  _ListBox[2] = "R";
	   }
	  

	 if((get_data.e_work_state != START_TEST)&&(get_data.e_work_state != GET_V1))
	 {
	  lenth = LISTVIEW_GetNumRows(WM_GetDialogItem(pMsg->hWin,GUI_ID_LISTVIEW_RESULT_T));
	  if(lenth < TEST_TIMES)
	  {
		record.test_times++;
	  
		sprintf(buf,"%d",lenth+1);

		_ListBox[0]= buf;
		LISTVIEW_InsertRow(WM_GetDialogItem(pMsg->hWin,GUI_ID_LISTVIEW_RESULT_T),0,_ListBox);

		if(ttpars.dir !=2)
		{
		BUTTON_SetText(WM_GetDialogItem(pMsg->hWin,GUI_ID_BUTTON_TRT),"正转中");
		ttpars.dir = 1;
		}else {
		BUTTON_SetText(WM_GetDialogItem(pMsg->hWin,GUI_ID_BUTTON_TRT),"反转中");	
		}
		motor_dir(ttpars.dir);

		BUTTON_SetText(WM_GetDialogItem(pMsg->hWin,GUI_ID_BUTTON_TSTOP),"运行中");
		start_test_init();

		if(!disp_mult)
		{
		draw_clear(&tdraw);
		}
		tdraw.draw_color = _aColor[record.test_times%5];
		tdraw.data_size = 0;
	  }
	  all_button(0,GUI_ID_BUTTON_TMAIN);
	  botton_able(1,GUI_ID_BUTTON_TSTOP);
	}
 }
开发者ID:weimingtom,项目名称:stm32-gui,代码行数:59,代码来源:LimitSpeedT.c


示例6: _ExecKeyboard

int _ExecKeyboard(void) {
  int i;
  int Key;
  BUTTON_Handle ahButton[52];
  BUTTON_Handle hButtonESC;
  EDIT_Handle   hEdit;
  GUI_RECT rText = {000,0, LCD_XSIZE, 20};
  GUI_SetBkColor(GUI_BLUE);  
  GUI_Clear();
  GUI_DrawBitmap(&bmMicriumLogo, 0, 0);
  GUI_SetFont(&GUI_Font16B_1);
  GUI_SetColor(GUI_WHITE);
  GUI_DispStringInRect("µC/GUI", &rText, GUI_TA_RIGHT | GUI_TA_VCENTER);
  rText.y0 +=20;
  rText.y1 +=20;
  GUI_DispStringInRect("Touch screen demo", &rText, GUI_TA_RIGHT | GUI_TA_VCENTER);
  /* Create Keyboard Buttons */
  for (i=0; i< 51; i++) {
    int Pos = (i < 47) ? i : i+4;
    int x0 = 5  + 28*(Pos%11);
    int y0 = 100 + 28*(Pos/11);
    char c = _acText[i];
    int Id = c ? c : 1;
    char ac[2] = {0};
    char *s= ac;
    ac[0] = c;
    ahButton[i] = BUTTON_Create( x0, y0, 25, 25, Id,BUTTON_CF_SHOW );
    BUTTON_SetText   (ahButton[i], s);
    #if GUI_SUPPORT_MEMDEV
      BUTTON_EnableMemdev(ahButton[i]);
    #endif
  }
  ahButton[i] = BUTTON_Create( 89, 212, 109, 25, ' ',BUTTON_CF_SHOW );
  hButtonESC = BUTTON_Create( 230, 40, 80, 25, GUI_ID_CANCEL,BUTTON_CF_SHOW );
  BUTTON_SetText   (hButtonESC, "ESC");
  hEdit = EDIT_Create( 5, 70, 310, 25, ' ', 80, 0 );
  EDIT_SetFont(hEdit, &GUI_Font8x16);
  BUTTON_SetBkColor(ahButton[49], 0, GUI_RED);
  BUTTON_SetBkColor(ahButton[50], 0, GUI_BLUE);
  /* Handle Keyboard until ESC or ENTER is pressed */
  do {
    Key = GUIDEMO_WaitKey();
    switch (Key) {
    case 0:
    case GUI_ID_CANCEL:
     break;
    default:
      EDIT_AddKey(hEdit, Key);
	  
    }
  } while ((Key != 'N') && (Key!=GUI_ID_CANCEL) && (Key!=0));
  /* Cleanup */
  for (i=0; i< countof(ahButton); i++) {
    BUTTON_Delete(ahButton[i]);
  }
  BUTTON_Delete(hButtonESC);
  EDIT_Delete(hEdit);
  return Key;
}
开发者ID:Arie001,项目名称:cortex-m3-applications.temperaturecontrolui,代码行数:59,代码来源:GUIDEMO_Touch.c


示例7: _cbBk

/*********************************************************************
*
*       _cbBk
*/
static void _cbBk(WM_MESSAGE * pMsg) 
{
	static unsigned int GirdFlag = 0;
	int NCode, Id;
  switch (pMsg->MsgId) {
  case WM_PAINT:
		GUI_SetBkColor(GUI_LIGHTBLUE);
	  GUI_Clear();
    GUI_DispStringAt("Temperature Curve ", 80, 0);
  // GUIDEMO_DrawBk(1);
    break;
	case WM_TOUCH:
		GirdFlag++;
		GRAPH_SetGridVis(hGraph,GirdFlag%3);  //!< Display the  if touch the screen
		break;

	/*******************/
	case WM_NOTIFY_PARENT:
      Id    = WM_GetId(pMsg->hWinSrc);    /* Id of widget */
      NCode = pMsg->Data.v;               /* Notification code */
      switch (NCode) {
        case WM_NOTIFICATION_RELEASED:    /* React only if released */
          if (Id == ID_CURVE_BTN_SWTITCH_2_PARA)  /* ID =210 btn Button */  
					{                   	
							ClosePWM = ! ClosePWM;
						
							if(1 == ClosePWM)
							{
									BUTTON_SetText(btn,"Closed");
							}
							else
							{
									BUTTON_SetText(btn,"Running");
							}
							
          } 	
					if (Id == 202)  /* ID =210 btn Button */  
					{                   	
						BUTTON_SetText(btnClear,"PID_Set");
						GPIO_SetBits(GPIOF,GPIO_Pin_8);
						
						PID_CFG_Flag = 1;
						
						WM_HideWindow(hWM_HBKWIN_CURVE);
				  	WM_ShowWindow(hWM_HBKWIN_CFG_PID);

          } 
        break;      
        default:          
				{
				}
      }
	break;
	
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:Niyunfeng,项目名称:MIO_PID_Controller,代码行数:62,代码来源:MainTask.c


示例8: GUIDEMO_Touch

void GUIDEMO_Touch(void) {
	
  #define ID_KEYBOARD  1
  #define ID_TESTCAL   2
  #define ID_CALIBRATE 3
  int i, r;
  int XSize = LCD_GetXSize();
  int YSize = LCD_GetYSize();
  int XMid = XSize / 2;
  int YMid = YSize / 2;
  //GUIDEMO_NotifyStartNext();
  GUIDEMO_HideInfoWin();
  
  do {
    GUI_RECT rText;/*= {0, 80, XSize, 120};*/
    BUTTON_Handle ahButton[3];
    rText.x0=0;
    rText.y0=50;
    rText.x1=XSize;
    rText.y1=90;
    GUI_SetBkColor(GUI_BLUE);
    GUI_Clear();
    GUI_DrawBitmap(&bmMicriumLogo, (XSize - 1 - bmMicriumLogo.XSize) / 2, 15);
    GUI_SetFont(&GUI_Font16B_1);
    GUI_DispStringInRect("µC/GUI Touch screen demo", &rText, GUI_TA_HCENTER | GUI_TA_VCENTER);
    ahButton[0] =  BUTTON_Create( XMid - 50, YMid - 30, 100, 50, ID_CALIBRATE,BUTTON_CF_SHOW );
    ahButton[1] =  BUTTON_Create( XMid - 90, YMid + 30, 80, 30, ID_KEYBOARD, BUTTON_CF_SHOW );
    ahButton[2] =  BUTTON_Create( XMid + 10, YMid + 30, 80, 30, ID_TESTCAL,BUTTON_CF_SHOW );
    BUTTON_SetText (ahButton[0], "Calibrate");
    BUTTON_SetBkColor(ahButton[0], 0, GUI_RED);
    BUTTON_SetText (ahButton[1], "Keyboard");
    BUTTON_SetText (ahButton[2], "Test calibration");
    BUTTON_SetFont(ahButton[0], &GUI_FontComic18B_ASCII);
    r = GUIDEMO_WaitKey();
    if (r==0) {
      r = ID_KEYBOARD;
      BUTTON_SetState(ahButton[1],BUTTON_STATE_PRESSED);
      GUIDEMO_Delay(500);
    }
    for (i=0; i< countof(ahButton); i++) {
      BUTTON_Delete(ahButton[i]);
    }
    switch (r) {
    case ID_KEYBOARD:  init_uart0(); send_press_key(); break;
    case ID_CALIBRATE: _ExecCalibration(); break;
    case ID_TESTCAL:   _TestCalibration(); break;
    }
  } while (r && (r!='n') && (r!='N'));
}
开发者ID:Arie001,项目名称:cortex-m3-applications.temperaturecontrolui,代码行数:49,代码来源:GUIDEMO_Touch.c


示例9: _TestCalibration

void _TestCalibration(void) {
  int IdleCnt=0;
  BUTTON_Handle hButton;
  GUI_SetBkColor(GUI_RED);  
  GUI_SetColor(GUI_WHITE);  
  GUI_Clear();
  hButton =  BUTTON_Create( 225, 15, 80, 40, 1, BUTTON_CF_SHOW );
  BUTTON_SetText (hButton, "ABORT");
  BUTTON_SetFont (hButton, &GUI_FontComic18B_ASCII);
  while ((IdleCnt<50) && (GUI_GetKey()==0)) {
    static GUI_PID_STATE StateLast;
    GUI_PID_STATE State;
    GUI_TOUCH_GetState(&State);
    if ((StateLast.Pressed != State.Pressed) && (State.Pressed == 0)) {
      GUI_Clear();
    }
    if ((StateLast.x != State.x) || ((StateLast.y != State.y))) {
      if (State.Pressed) {
        GUI_FillCircle(State.x, State.y, 5);
      }
      StateLast = State;
    }
    if (State.Pressed) {
      IdleCnt =0;
    } else {
      IdleCnt++;
    }
    GUI_Delay (100);
  }
  EDIT_Delete(hButton);
}
开发者ID:Arie001,项目名称:cortex-m3-applications.temperaturecontrolui,代码行数:31,代码来源:GUIDEMO_Touch.c


示例10: OnxxxClicked_CR

void OnxxxClicked_CR(WM_MESSAGE * pMsg)
{
	if((get_data.e_work_state != START_TEST)&&(get_data.e_work_state != GET_V1))
	{
	
    if(button_cr_state)
	{
	BUTTON_SetText(WM_GetDialogItem(pMsg->hWin,GUI_ID_BUTTON_CR),"反转");
	button_cr_state = 0;
	}else{
	BUTTON_SetText(WM_GetDialogItem(pMsg->hWin,GUI_ID_BUTTON_CR),"正转");
	button_cr_state = 1;	
	}
	}
	 
}
开发者ID:weimingtom,项目名称:stm32-gui,代码行数:16,代码来源:LimitSpeedH_S.c


示例11: GUIDEMO_main

/*********************************************************************
*
*       GUIDEMO_main(): Small version of the demo
*
**********************************************************************
*/
void GUIDEMO_main(void) {
  #if GUI_WINSUPPORT
    int i;
  #endif
  #if GUI_WINSUPPORT
    #if LCD_NUM_DISPLAYS > 1
      FRAMEWIN_CreateAsChild(10, 10, 100, 100, WM_GetDesktopWindowEx(1), "Display 1", NULL, WM_CF_SHOW);
      GUI_Delay(1000);
    #endif
    WM_SetCreateFlags(WM_CF_MEMDEV);  /* Automatically use memory devices on all windows */
    _ButtonSizeX = 27;
    _ButtonSizeY = 14;
    _ahButton[0] = BUTTON_Create(LCD_GetXSize() - _ButtonSizeX * 2 - 5,
                                 LCD_GetYSize() - _ButtonSizeY - 3,
                                 _ButtonSizeX, _ButtonSizeY, 
                                 'H' , WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
    _ahButton[1] = BUTTON_Create(LCD_GetXSize() - _ButtonSizeX - 3,
                                 LCD_GetYSize() - _ButtonSizeY - 3,
                                 _ButtonSizeX, _ButtonSizeY, 
                                 'N' , WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
    BUTTON_SetFont(_ahButton[0], &GUI_Font8_ASCII);
    BUTTON_SetFont(_ahButton[1], &GUI_Font8_ASCII);
    BUTTON_SetText(_ahButton[0], "Stop");
    BUTTON_SetText(_ahButton[1], "Next");
    _UpdateCmdWin();
    WM_ExecIdle();
  #endif
  /* Show Intro */
  GUIDEMO_Intro();
  /* Run the individual demos !  */
  for (_iTest = 0; _apfTest[_iTest]; _iTest++) {
    GUI_CONTEXT ContextOld;
    GUI_SaveContext(&ContextOld);
    _iTestMinor = 0;
    _UpdateCmdWin();
    (*_apfTest[_iTest])();
    _CmdNext = 0;
    GUI_RestoreContext(&ContextOld);
  }
  /* Cleanup */
  #if GUI_WINSUPPORT
    for (i = 0; i < countof(_ahButton); i++) {
      BUTTON_Delete(_ahButton[i]);
    }
  #endif
}
开发者ID:Mrho,项目名称:ucos-gui,代码行数:52,代码来源:GUIDEMO.c


示例12: OnButtonTStopClicked

 void OnButtonTStopClicked(WM_MESSAGE * pMsg)
 {
	 get_data.e_work_state = HAND_OFF;
	BUTTON_SetText(WM_GetDialogItem(pMsg->hWin,GUI_ID_BUTTON_TSTOP),"停止");
	motor_dir(0);

	all_button(1,GUI_ID_BUTTON_TMAIN);
 }
开发者ID:weimingtom,项目名称:stm32-gui,代码行数:8,代码来源:LimitSpeedT.c


示例13: OnButtonRTClicked

 void OnButtonRTClicked(WM_MESSAGE * pMsg)
 {
	motor_speed(0);
	if((get_data.e_work_state != START_TEST)&&(get_data.e_work_state != GET_V1))
	{
	
    if(ttpars.dir == 1)
	{
	BUTTON_SetText(WM_GetDialogItem(pMsg->hWin,GUI_ID_BUTTON_TRT),"反转");
	ttpars.dir = 2;
	}else {
	BUTTON_SetText(WM_GetDialogItem(pMsg->hWin,GUI_ID_BUTTON_TRT),"正转");	
	ttpars.dir = 1;
	}
	motor_dir(ttpars.dir);
	}
 }
开发者ID:weimingtom,项目名称:stm32-gui,代码行数:17,代码来源:LimitSpeedT.c


示例14: CreateCalculator

static void CreateCalculator(WM_HWIN hWin)
{
	int y0 = 55;
	int XSize = LCD_GetXSize();
	int YSize = LCD_GetYSize();
	int XStep = XSize / 5;
	int YStep = (YSize - y0 - 25) / 4;

	char ac[2];
	char *s=NULL;
	int XPos,YPos;
	int i = 0;
	for (i = 0; i < 19; i++)
	{
		if (i == 14)
			i = 15;
		 XPos = (i % 5) * XStep + 3;
		 YPos = (i / 5) * YStep + 3 + y0;

		memset(&ac, 0, sizeof(char)* 2);
		 s = ac;
		ac[0] = _acText[i];
		if (i == 18)
		{
			hButton[i] = BUTTON_CreateAsChild(XPos, YPos, XStep * 2 - 5, YStep - 5, hWin, _acText[i], WM_CF_SHOW);
		}
		else if (i == 9)
			hButton[i] = BUTTON_CreateAsChild(XPos, YPos, XStep - 5, YStep * 2 - 5, hWin, _acText[i], WM_CF_SHOW);
		else hButton[i] = BUTTON_CreateAsChild(XPos, YPos, XStep - 5, YStep - 5, hWin, _acText[i], WM_CF_SHOW);
		BUTTON_SetBkColor(hButton[i], BUTTON_CI_UNPRESSED, 0x50A0FF);
		BUTTON_SetBkColor(hButton[i], BUTTON_CI_PRESSED, 0x004080);
		BUTTON_SetTextColor(hButton[i], BUTTON_CI_UNPRESSED, GUI_WHITE);
		BUTTON_SetTextColor(hButton[i], BUTTON_CI_PRESSED, GUI_WHITE);
		BUTTON_SetFont(hButton[i], &GUI_Font24B_ASCII);
		if (i == 18)
		{
			BUTTON_SetText(hButton[i], "EXIT");
		}
		else BUTTON_SetText(hButton[i], s);
	}
	hEdit = EDIT_CreateAsChild(0, 0, 320, 50, hWin, 0, WM_CF_SHOW, 80);
	EDIT_SetTextColor(hEdit, 0, 0x0080FF);
	EDIT_SetFont(hEdit, &GUI_Font24B_ASCII);
	EDIT_SetBkColor(hEdit, 0, GUI_RED);
}
开发者ID:fzzjoy,项目名称:GraduationProject,代码行数:45,代码来源:AppCalculator.c


示例15: BUTTON_CreateIndirect

BUTTON_Handle BUTTON_CreateIndirect(const GUI_WIDGET_CREATE_INFO* pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK* cb) {
  BUTTON_Handle  hThis;
  GUI_USE_PARA(cb);
  hThis = BUTTON_CreateAsChild(
    pCreateInfo->x0 + x0, pCreateInfo->y0 + y0, pCreateInfo->xSize, pCreateInfo->ySize,
    hWinParent, pCreateInfo->Id, pCreateInfo->Flags);
  BUTTON_SetText(hThis, pCreateInfo->pName);
  return hThis;
}
开发者ID:Cee,项目名称:uCOS-II-Timebomb,代码行数:9,代码来源:button.c


示例16: BUTTON_Set_Bitmap_Ex

void BUTTON_Set_Bitmap_Ex(WM_HWIN hWin, int buttonId, const GUI_BITMAP *pBitmap, int x, int y)
{
    WM_HWIN hItem;
    hItem = WM_GetDialogItem(hWin, buttonId);
    BUTTON_SetText(hItem, " ");
    BUTTON_SetBitmapEx(hItem, BUTTON_CI_DISABLED, pBitmap, x, y);
    BUTTON_SetBitmapEx(hItem, BUTTON_CI_PRESSED, pBitmap, x, y);
    BUTTON_SetBitmapEx(hItem, BUTTON_CI_UNPRESSED, pBitmap, x, y);
}
开发者ID:bleuelotus,项目名称:SweepRobot_Testing_Host_STemWin,代码行数:9,代码来源:EJE_SWRB_TEST_DLG_Conf.c


示例17: _CreateLButton

/*********************************************************************
*
*       _CreateLButton
*/
static WM_HWIN _CreateLButton(const char* pText, int x, int w, int h, WM_HWIN hParent, int Id) {
  WM_HWIN hButton;
  GUI_RECT Rect;
  WM_GetClientRectEx(hParent, &Rect);
  hButton = BUTTON_CreateEx(x, Rect.y1 - h + 1, w, h, hParent, WM_CF_SHOW | WM_CF_ANCHOR_BOTTOM, 0, Id);
  BUTTON_SetText(hButton, pText);
  BUTTON_SetFont(hButton, &GUI_Font8_ASCII);
  return hButton;
}
开发者ID:dadianxukong,项目名称:gps,代码行数:13,代码来源:WIDGET_Multiedit.c


示例18: _ShowButton

static void _ShowButton(WM_HWIN hParent)
{
	_ahButton[0] = BUTTON_CreateAsChild(60, 15, 13, 14, hParent, BUTTON_ID_LEFT, WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
	_ahButton[1] = BUTTON_CreateAsChild(260, 15, 13, 14, hParent, BUTTON_ID_RIGHT, WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);
	_ahButton[2] = BUTTON_CreateAsChild(10, 10, 30, 25, hParent, BUTTON_ID_EXIT, WM_CF_SHOW | WM_CF_STAYONTOP | WM_CF_MEMDEV);

	BUTTON_SetBitmap(_ahButton[0], BUTTON_BI_UNPRESSED, &bmLeftarrows);
	BUTTON_SetBitmap(_ahButton[1], BUTTON_BI_UNPRESSED, &bmRightarrows);
	BUTTON_SetText(_ahButton[2], "EXIT");
}
开发者ID:fzzjoy,项目名称:GraduationProject,代码行数:10,代码来源:AppCalendar.c


示例19: egx_pushbutton_create_

egx_wnd_t egx_pushbutton_create_(int res_id,char *name,egx_uint32_t style,int x,int y,int width,int height,egx_wnd_t parent)
{
	BUTTON_Handle hButton;
	if(parent){
		hButton = BUTTON_CreateAsChild(x, y, width, height,GUIWND_TO_HWND(parent),res_id,WM_CF_SHOW);
	}else{
		hButton = BUTTON_Create(x, y, width, height,res_id,WM_CF_SHOW);
	}
	BUTTON_SetText(hButton, name);
	return HWND_TO_GUIWND(hButton);
}
开发者ID:edgarliu,项目名称:easygx,代码行数:11,代码来源:easygx_control_.c


示例20: _CreateButton

/*********************************************************************
*
*       _CreateButton
*/
static WM_HWIN _CreateButton(int x, int y, int w, int h, int bx, int by, const char * pText, GUI_CONST_STORAGE GUI_BITMAP * pBm, int Id) {
  WM_HWIN hWin;
  hWin = BUTTON_CreateEx(x, y, w, h, WM_HBKWIN, WM_CF_SHOW, 0, Id);
  BUTTON_SetBitmapEx(hWin, 0, pBm, bx + 0, by + 0);
  BUTTON_SetBitmapEx(hWin, 1, pBm, bx + 1, by + 0);
  BUTTON_SetFont(hWin, &GUI_FontAA2_21);
  BUTTON_SetTextAlign(hWin, GUI_TA_TOP | GUI_TA_HCENTER);
  BUTTON_SetText(hWin, pText);
  BUTTON_SetBkColor(hWin, 0, GUI_LIGHTBLUE);
  return hWin;
}
开发者ID:satyanarayangullapalli,项目名称:arm_lpc_1788_sdk,代码行数:15,代码来源:MainTask.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ BU_LIST_FOR函数代码示例发布时间:2022-05-30
下一篇:
C++ BUTTON_CreateEx函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap