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

C++ GUI_SetBkColor函数代码示例

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

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



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

示例1: Draw

static void Draw(void * p) {
  int i;
  PARAM * pParam = (PARAM *)p;
  GUI_SetBkColor(GUI_BLACK);
  GUI_SetColor(GUI_DARKGRAY);
  GUI_ClearRect(19, (LCD_YSIZE - 20) - YSIZE, (LCD_XSIZE - 2), (LCD_YSIZE - 21));
  for (i = 0; i < (YSIZE / 2); i += 20) {
    GUI_DrawHLine((LCD_YSIZE - 20) - (YSIZE / 2) + i, 19, (LCD_XSIZE - 2));
    if (i) {
      GUI_DrawHLine((LCD_YSIZE - 20) - (YSIZE / 2) - i, 19, (LCD_XSIZE - 2));
    }
  }
  for (i = 40; i < (LCD_XSIZE - 20); i += 40) {
    GUI_DrawVLine(18 + i, (LCD_YSIZE - 20) - YSIZE, (LCD_YSIZE - 21));
  }
  GUI_SetColor(COLOR_GRAPH0);
  GUI_DrawGraph(pParam->aY, (LCD_XSIZE - 20), 19, (LCD_YSIZE - 20) - YSIZE);
}
开发者ID:byxob,项目名称:calendar,代码行数:18,代码来源:MEMDEV_DrawGraph.c


示例2: _cbDesktop

/*********************************************************************
*
*       _cbDesktop
*
* Purpose:
*   This routine handles the drawing of the desktop window.
*/
static void _cbDesktop(WM_MESSAGE * pMsg) {
  int i;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    GUI_SetBkColor(GUI_RED);
    GUI_Clear();
    GUI_SetFont(&GUI_Font24_ASCII);
    GUI_DispStringHCenterAt(_aTitle, 160, 5);
    GUI_DispNextLine();
    GUI_SetFont(GUI_DEFAULT_FONT);
    GUI_DispNextLine();
    for (i = 0; i < GUI_COUNTOF(_apExplain); i++) {
      GUI_DispStringHCenterAt(_apExplain[i], 160, GUI_GetDispPosY());
      GUI_DispNextLine();
    }
    break;
  }
}
开发者ID:huangfeng007,项目名称:ChuangKeUnion-1st,代码行数:25,代码来源:WIDGET_NumPad.c


示例3: _OnPaint

/*********************************************************************
*
*       _OnPaint
*/
static void _OnPaint(void) {
  int xPos = 0;
  GUI_RECT Rect;
  GUI_SetBkColor(GUI_GRAY);
  GUI_Clear();
  WM_GetClientRect(&Rect);
  Rect.x1 = HEADER_GetItemWidth(_hHeader, 0);
  GUI_SetColor(GUI_RED);
  GUI_FillRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1);
  Rect.x0 = Rect.x1;
  Rect.x1 += HEADER_GetItemWidth(_hHeader, 1);
  GUI_SetColor(GUI_GREEN);
  GUI_FillRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1);
  Rect.x0 = Rect.x1;
  Rect.x1 += HEADER_GetItemWidth(_hHeader, 2);
  GUI_SetColor(GUI_BLUE);
  GUI_FillRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1);
}
开发者ID:qiurenguo2014,项目名称:youjiesun,代码行数:22,代码来源:WIDGET_Header.c


示例4: cbBackWin

static WM_RESULT cbBackWin( WM_MESSAGE* pMsg) {
  WM_KEY_INFO* pKeyInfo;
  switch (pMsg->MsgId) {
  case WM_KEY:
    pKeyInfo = (WM_KEY_INFO*)pMsg->Data.p;
    if (pKeyInfo->PressedCnt == 0) {
      GUI_StoreKey(pKeyInfo->Key);
    }
    break;
  case WM_PAINT:
    if (WM__BkColor != GUI_INVALID_COLOR) {
      GUI_SetBkColor(WM__BkColor);
      GUI_Clear();
    }
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:byxob,项目名称:calendar,代码行数:18,代码来源:wm.c


示例5: _cbClock

static void  _cbClock(WM_MESSAGE *pMsg)
{
	int NCode, Id;
	//PARAM pParam;
	switch (pMsg->MsgId)
	{
	case WM_PAINT:
		GUI_SetBkColor(GUI_WHITE); 
		GUI_Clear();
		GUI_SetColor(GUI_BLACK);
		_ShowButton(pMsg->hWin);
		GUI_DrawBitmap(&bmwatch, 37, 0);

		//GUI_AA_FillPolygon(pParam.aPoint1, GUI_COUNTOF(_aNeedle[0]), MAG * LCD_GetXSize() / 2, MAG * (LCD_GetYSize() / 2));
	//	GUI_AA_FillPolygon(pParam.aPoint2, GUI_COUNTOF(_aNeedle[1]), MAG * LCD_GetXSize() / 2, MAG * (LCD_GetYSize() / 2));
		//GUI_AA_FillPolygon(pParam.aPoint3, GUI_COUNTOF(_aNeedle[2]), MAG * LCD_GetXSize() / 2, MAG * (LCD_GetYSize() / 2));

		GUI_FillCircle(160, 120, 3);
	
		break;
	case WM_NOTIFY_PARENT:
		Id = WM_GetId(pMsg->hWinSrc);    /* Id of widget */
		NCode = pMsg->Data.v;            /* Notification code */
		switch (NCode)
		{
		case WM_NOTIFICATION_CLICKED:
			switch (Id)
			{
			case BUTTON_ID_EXIT:
				GUI_SetAppIndex(APP_MainMenu);
				GUI_SetAppDirection(MEMDEV_ANIMATION_LEFT);
				_MoveShiftWindow(&pMsg->hWin, MEMDEV_ANIMATION_RIGHT, 1, 1);
				GUI_SetCancel(APP_Clock);
				GUI_ClearHalt();
				break;
			default:
				break;
			}
		}
		break;
	default:
		WM_DefaultProc(pMsg);
	}
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:44,代码来源:AppClock.c


示例6: _cbWindow2

/*******************************************************************
*
*       _cbWindow2
*/
static void _cbWindow2(WM_MESSAGE* pMsg) {
  int x, y;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    GUI_SetBkColor(_WindowColor2);
    GUI_Clear();
    GUI_SetColor(GUI_WHITE);
    GUI_SetFont(&GUI_Font24_ASCII);
    x = WM_GetWindowSizeX(pMsg->hWin);
    y = WM_GetWindowSizeY(pMsg->hWin);
    GUI_DispStringHCenterAt("Window 2", x / 2, (y / 4) - 12);
    break;
  case WM_SIZE:
    WM_InvalidateWindow(_hChild);
    break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:ChijunShen,项目名称:wildfire_stm32_iso,代码行数:23,代码来源:GUIDEMO_WM.c


示例7: OUI_DrawGraph

void OUI_DrawGraph(){	
	GUI_MEMDEV_Select(OUI_MemoryDeviceGrid.DeviceHandle);
	GUI_SetBkColor(OUI_GRAPH_BACKGROUND);
	GUI_Clear();
	
	GUI_SetColor(OUI_GRAPH_LINES);
	for(int i = 0; i <= 180; i += 20){
		GUI_DrawLine(0, i, 270, i);
	}
	for(int i = 0; i <= 270; i += 30){
		GUI_DrawLine(i, 0, i, 180);
	}
	
	OUI_Components[2]->DrawGraph(OUI_Components[1], 0, 0);
	OUI_Components[1]->DrawGraph(OUI_Components[1], 0, 0);
	
	GUI_MEMDEV_CopyToLCDAt(OUI_MemoryDeviceGrid.DeviceHandle,OUI_MemoryDeviceGrid.X,OUI_MemoryDeviceGrid.Y);
	GUI_MEMDEV_Clear(OUI_MemoryDeviceGrid.DeviceHandle);
}
开发者ID:jakakordez,项目名称:oscilloscope,代码行数:19,代码来源:oui.c


示例8: _DemoOrData

/*******************************************************************
*
*       _DemoOrData
*/
static void _DemoOrData(void) {
  int i;
  PARAM Param;
  GUI_RECT Rect = {19, (LCD_YSIZE - 20) - YSIZE, (LCD_XSIZE - 2), (LCD_YSIZE - 21)};
  GUI_HMEM hMem = GUI_ALLOC_AllocZero(405 * sizeof(I16));
  GUI_SetColor(GUI_WHITE);
  GUI_SetBkColor(GUI_RED);
  GUI_ClearRect(0, 55, LCD_XSIZE, 75);
  GUI_SetFont(&GUI_FontComic18B_1);
  GUI_DispStringAt("Several waves...", 20 ,55);
  Param.aY = GUI_ALLOC_h2p(hMem);
  _GetSineData(Param.aY, 405);
  GUI_MEMDEV_Draw(&Rect, _Draw, &Param, 0, 0);
  for (i = 0; (i < 90); i++) {
    _DrawOrData(GUI_GREEN, ++Param.aY);
    GUI_Delay(10);
  }
  GUI_ALLOC_Free(hMem);
}
开发者ID:huangfeng007,项目名称:ChuangKeUnion-1st,代码行数:23,代码来源:memdev_drawgraph.c


示例9: _OnPaint_bg

/**
* @brief  Paints record button
* @param  hObj: button handle
* @retval None
*/
static void _OnPaint_bg(BUTTON_Handle hObj) {

  int Index = 0;
  
  GUI_SetBkColor(FRAMEWIN_GetDefaultClientColor());
  GUI_Clear();
  
  
  Index = (WIDGET_GetState(hObj) & BUTTON_STATE_PRESSED) ? 1 : 0;
  
  if (Index)
  {
    GUI_DrawBitmap(&bmbg, 0, 0);
  }
  else
  {
    GUI_DrawBitmap(&bmbg, 0, 0);
  }
}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:24,代码来源:vnc_server_win.c


示例10: _OnPaint_camera

/**
  * @brief  Paints camera button
  * @param  hObj: button handle
  * @retval None
  */
static void _OnPaint_camera(BUTTON_Handle hObj, uint32_t alarm_status, uint32_t camera_status) {
  
  GUI_SetBkColor(FRAMEWIN_GetDefaultClientColor());
  GUI_Clear();
    
  GUI_DrawBitmap(&bmcamera, 0, 0);
  
  if(HomeSettings.b.alarm == ALARM_ON)
  {     
    if(HomeSettings.b.camera != CAM_DESACTIVATED)
    {
      GUI_DrawBitmap(&bmdes_camera, 0, 0);
    }
  }
  else
  {
    GUI_DrawBitmap(&bmcamera, 0, 0);
  }
}
开发者ID:Lembed,项目名称:STM32CubeF4-mirrors,代码行数:24,代码来源:home_alarm_win.c


示例11: MainTask

/*********************************************************************
*
*       MainTask
*/
void MainTask(void) {
  GUI_PID_STATE TouchState;
  int           xPhys;
  int           yPhys;

  GUI_Init();
  GUI_CURSOR_Show();
  GUI_CURSOR_Select(&GUI_CursorCrossL);
  GUI_SetBkColor(GUI_WHITE);
  GUI_SetColor(GUI_BLACK);
  GUI_Clear();
  GUI_DispString("Measurement of\nA/D converter values");
  while (1) {
    GUI_TOUCH_GetState(&TouchState);  // Get the touch position in pixel
    xPhys = GUI_TOUCH_GetxPhys();     // Get the A/D mesurement result in x
    yPhys = GUI_TOUCH_GetyPhys();     // Get the A/D mesurement result in y
    //
    // Display the measurement result
    //
    GUI_SetColor(GUI_BLUE);
    GUI_DispStringAt("Analog input:\n", 0, 20);
    GUI_GotoY(GUI_GetDispPosY() + 2);
    GUI_DispString("x:");
    GUI_DispDec(xPhys, 4);
    GUI_DispString(", y:");
    GUI_DispDec(yPhys, 4);
    //
    // Display the according position
    //
    GUI_SetColor(GUI_RED);
    GUI_GotoY(GUI_GetDispPosY() + 4);
    GUI_DispString("\nPosition:\n");
    GUI_GotoY(GUI_GetDispPosY() + 2);
    GUI_DispString("x:");
    GUI_DispDec(TouchState.x,4);
    GUI_DispString(", y:");
    GUI_DispDec(TouchState.y,4);
    //
    // Wait a while
    //
    GUI_Delay(100);
  };
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:47,代码来源:TOUCH_Sample.c


示例12: _cbBkWindow

/*********************************************************************
*
*       _cbBkWindow
*/
static void _cbBkWindow(WM_MESSAGE * pMsg) {
  int xPos;
  int yPos;

  xPos = LCD_GetXSize() / 2 - bmSeggerLogoBlue.XSize/2;
  yPos = LCD_GetYSize() / 2 - bmSeggerLogoBlue.YSize/2 ;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    GUI_SetBkColor(GUI_BLUE);
    GUI_Clear();
    GUI_SetColor(GUI_WHITE);
    GUI_SetFont(&GUI_Font24_ASCII);
    GUI_DispStringHCenterAt("DIALOG_SliderColor - Sample", 160, 5);
    GUI_DrawBitmap(&bmSeggerLogoBlue, xPos, yPos );
    break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:23,代码来源:Task_0.c


示例13: GetAs12HourClock

    /*****************************************************************************
    * Function
    * DESCRIPTION:
    * Redraws or clears the colon.
    *****************************************************************************/
    bool DataPointTime::RedrawColon()
    {
      if (mVisible)
      {
        int x = 0;
        int minutes = mTime.GetTime(MINUTES);

        char sz_time[10];
        if (mFormat == DATETIME_FORMAT_MDY_AMPM)// timeformat using am/pm
        {
          bool isAm;
          int hoursOffset;
          GetAs12HourClock(&isAm, &hoursOffset);
          sprintf(sz_time, ":%02d %s", minutes, isAm ? "am" : "pm");
        }
        else
        {
          sprintf(sz_time, ":%02d", minutes);
        }

        SelectWindow();
        GUI_SetColor(mColour);
        GUI_SetBkColor(mBackgroundColour);
        GUI_SetFont(GetFont());

        x = GetWidth() - GUI_GetStringDistX(sz_time);

        if (mShowColon)
        {
          GUI_DispStringAt(":", x, 2);
          mLastColonPosition = x;
        }
        else if (mLastColonPosition == x)
        {
          GUI_ClearRect(x, 0, x + 1, GetHeight() - 1);
        }

        Validate();
      }
      
      return true;
    }
开发者ID:Strongc,项目名称:DC_source,代码行数:47,代码来源:DataPointTime.cpp


示例14: _UpdateCmdWin

static void _UpdateCmdWin(void) {
  #if GUI_WINSUPPORT && GUIDEMO_LARGE
    /* Update info in command window */
    WM_HWIN hWin;
    GUI_CONTEXT ContextOld;
    GUI_SaveContext(&ContextOld);
    hWin = WM_SelectWindow(_ahInfoWin[1]);
    GUI_SetDefault();
    GUI_SetBkColor(GUI_GRAY);
    GUI_Clear();
    GUI_DispStringAt("Demo ", 0, 0);
    GUI_DispDecMin(_iTest + 1);
    GUI_DispString(".");
    GUI_DispDecMin(_iTestMinor);
    GUI_DispString("/");
    GUI_DispDecMin(countof(_apfTest));
    WM_SelectWindow(hWin);
    GUI_RestoreContext(&ContextOld);
  #endif
}
开发者ID:rttg125,项目名称:Intelligent-bedroom-system,代码行数:20,代码来源:GUIDEMO.c


示例15: _cbChild

/*******************************************************************
*
*       _cbChild
*/
static void _cbChild(WM_MESSAGE* pMsg) {
  GUI_RECT Rect;
  int x, y;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    WM_GetInsideRect(&Rect);
    GUI_SetBkColor(_ChildColor);
    GUI_SetColor(_ChildFrame);
    GUI_ClearRectEx(&Rect);
    GUI_DrawRectEx(&Rect);
    GUI_SetColor(GUI_RED);
    GUI_SetFont(&GUI_Font24_ASCII);
    x = WM_GetWindowSizeX(pMsg->hWin);
    y = WM_GetWindowSizeY(pMsg->hWin);
    GUI_DispStringHCenterAt("Child window", x / 2, (y / 2) - 12);
    break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:24,代码来源:WM_Sample.c


示例16: _DemoEdit

/*******************************************************************
*
*       _DemoEdit
*
  Edit a string until ESC or ENTER is pressed
*/
static void _DemoEdit(void) {
  EDIT_Handle hEdit;
  char aBuffer[28];
  int Key;
  GUI_SetBkColor(GUI_BLACK);
  GUI_Clear();
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_Font24_ASCII);
  GUI_DispStringHCenterAt("WIDGET_Edit - Sample", 160, 5);
  GUI_SetFont(&GUI_Font8x16);
  GUI_DispStringHCenterAt("Use keyboard to modify string...", 160, 90);
  /* Create edit widget */
  hEdit = EDIT_Create( 50, 110, 220, 25, ' ', sizeof(aBuffer), WM_CF_SHOW);
  /* Modify edit widget */
  EDIT_SetText(hEdit, "Press <ENTER> when done...");
  EDIT_SetFont(hEdit, &GUI_Font8x16);
  EDIT_SetTextColor(hEdit, 0, GUI_RED);
  /* Set keyboard focus to edit widget */
  WM_SetFocus(hEdit);
  /* Handle keyboard until ESC or ENTER is pressed */
  do {
    WM_Exec();
    Key = GUI_GetKey();
  } while ((Key != GUI_KEY_ENTER) && (Key != GUI_KEY_ESCAPE));
  /* Fetch result from edit widget */
  if (Key == GUI_KEY_ENTER) {
    EDIT_GetText(hEdit, aBuffer, sizeof(aBuffer));
  }
  /* Delete the edit widget */
  EDIT_Delete(hEdit);
  GUI_ClearRect(0, 50, 319, 239);
  /* Display the changed string */
  if (Key == GUI_KEY_ENTER) {
    GUI_Delay(250);
    GUI_DispStringHCenterAt("The string you have modified is:", 160, 90);
    GUI_DispStringHCenterAt(aBuffer, 160, 110);
    GUI_Delay(3000);
    GUI_ClearRect(0, 50, 319, 239);
  }
  GUI_Delay(500);
}
开发者ID:satyanarayangullapalli,项目名称:arm_lpc_1788_sdk,代码行数:47,代码来源:WIDGET_Edit.c


示例17: wt_InitBackGround

/**
  * @brief  wt_InitBackGround
  * @param  
  * @retval None
  */
void wt_InitBackGround(void)
{
//	uint32_t i = 0;
  
	sprintf((char *)StatusText, "就绪...");
	
	GUI_SelectLayer(0);
	GUI_SetLayerVisEx (0, 0);
  GUI_DrawBitmap(&bm_BackGround480x272A, 0,0);  
	
	GUI_SetLayerVisEx (0, 1);
	GUI_SelectLayer(1);
	GUI_SetBkColor(GUI_TRANSPARENT);
  GUI_Clear();
	
	// creat title
	hWin_Title = GUI_CreateDialogBox(_aTitleDialogCreate, GUI_COUNTOF(_aTitleDialogCreate), _cbTitle, WM_HBKWIN, 0, 0);

	//creat status
	hWin_Statue = WM_CreateWindowAsChild(0,LCD_GetYSize()-25,LCD_GetXSize(), 25, WM_HBKWIN, WM_CF_SHOW | WM_CF_HASTRANS , _cbStatus, 0);
}
开发者ID:wujun9959,项目名称:IMS,代码行数:26,代码来源:wt_task_gui.c


示例18: _ShowHiresAntialiasing

/*******************************************************************
*
*       _ShowHiresAntialiasing

  This function creates the memory auto devices and handle the
  rotation of the pointers
*/
static void _ShowHiresAntialiasing(void) {
  int i;
  GUI_AUTODEV aAuto[2];
  PARAM Param;
  Param.Factor = 3;
  GUI_SetBkColor(GUI_BLACK);
  GUI_Clear();
  GUI_SetColor(GUI_WHITE);
  GUI_SetTextAlign(GUI_TA_HCENTER);
  GUI_SetFont(&GUI_Font24_ASCII);
  GUI_DispStringAt("AA_HiResAntialiasing - Sample", 160, 5);
  GUI_SetFont(&GUI_Font6x8);
  GUI_DispStringHCenterAt("Using\nhigh\nresolution\nmode", 110, 180);
  GUI_DispStringHCenterAt("Not using\nhigh\nresolution\nmode", 210, 180);
  /* Create GUI_AUTODEV objects */
  for (i = 0; i < countof(aAuto); i++) {
    GUI_MEMDEV_CreateAuto(&aAuto[i]);
  }
  /* Calculate pointer for high resolution */
  for (i = 0; i < countof(_aPointer); i++) {
    _aPointerHiRes[i].x = _aPointer[i].x * Param.Factor;
    _aPointerHiRes[i].y = _aPointer[i].y * Param.Factor;
  }
  GUI_AA_SetFactor(Param.Factor); /* Set antialiasing factor */
  while(1) {
    for (i = 0; i < 1800; i++) {
      float Angle = (i >= 900) ? 1800 - i : i;
      Angle *= 3.1415926f / 1800;
      /* Draw pointer with high resolution */
      GUI_AA_EnableHiRes();
      GUI_RotatePolygon(Param.aPoints, _aPointerHiRes, countof(_aPointer), Angle);
      GUI_MEMDEV_DrawAuto(&aAuto[0], &Param.AutoInfo, _DrawHiRes, &Param);
      /* Draw pointer without high resolution */
      GUI_AA_DisableHiRes();
      GUI_RotatePolygon(Param.aPoints, _aPointer, countof(_aPointer), Angle);
      GUI_MEMDEV_DrawAuto(&aAuto[1], &Param.AutoInfo, _Draw, &Param);
      GUI_Delay(2);
    }
  }
}
开发者ID:qiurenguo2014,项目名称:youjiesun,代码行数:47,代码来源:AA_HiResAntialiasing.c


示例19: ShowErrorMessage_C

/*****************************************************************************
 * FUNCTION - ShowErrorMessage_C
 * DESCRIPTION: Displays an error message. 
 * Further actions (Rebooting or ignoring errors when not debugging) depend 
 * on the caller (or the caller of the caller...).
 *
 * Called by embOS\D3018X\OS_Error and Factory::FatalErrorOccured()
 *  
 ****************************************************************************/
extern "C" void ShowErrorMessage_C(const char* errorDescription = "-")
{
  int i;
  char sz_msg[250];
  WM_HWIN win;
  WM_HWIN win_next;
  GUI_RECT  rect;

  WM_SelectWindow(WM_GetDesktopWindow());
  win = WM_GetFirstChild(WM_GetDesktopWindow());

  while(win != (WM_HWIN) NULL)
  {
    win_next = WM_GetNextSibling(win);
    WM_DeleteWindow(win);
    win = win_next;
  }

  WM_SetStayOnTop(WM_GetDesktopWindow(),1);
  WM_BringToTop(WM_GetDesktopWindow());
  GUI_SetBkColor(GUI_WHITE);
  GUI_SetColor(GUI_BLACK);
  GUI_SetFont(&Helvetica_57_13);
  GUI_Clear();

  sprintf(sz_msg, "Fatal error.\n\n %s", errorDescription);

  rect.x0 = 0;
  rect.y0 = 10;
  rect.x1 = 239;
  rect.y1 = 319;

  for (i=0; i<5; i++)
  {
    GUI_Clear();
    GUI_Delay(100);
    GUI_DispStringInRect(sz_msg,&rect,GUI_TA_VCENTER|GUI_TA_HCENTER);
    GUI_Delay(500);
  }
}
开发者ID:Strongc,项目名称:DC_source,代码行数:49,代码来源:ErrorHandler.cpp


示例20: _cbBk

/**
  * @brief  Callback routine of desktop window
  * @param  pMsg: pointer to a data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbBk(WM_MESSAGE* pMsg) {
	uint32_t NCode, Id, sel;
	static uint32_t module_mutex = 0;

	switch (pMsg->MsgId) {
		case WM_PAINT:
			GUI_SetBkColor(GUI_TRANSPARENT);
			GUI_Clear();
			break;
		case WM_NOTIFY_PARENT:
			Id    = WM_GetId(pMsg->hWinSrc);
			NCode = pMsg->Data.v;
			switch (NCode) {
				case WM_NOTIFICATION_CLICKED:
					if ('0' == Id) {
						sel = ICONVIEW_GetSel(pMsg->hWinSrc);
						if (sel < GUI_COUNTOF(_aBitmapItem)) {
							if (0 == module_mutex) {
								module_mutex = 1;
								_apModules[sel](pMsg->hWinSrc);
								current_module = sel;
							}
						}
					}
					break;
				case 0x500:
					module_mutex = 0;
					current_module = 0xFF;
					ICONVIEW_SetSel(pMsg->hWinSrc, -1);
					break;
				default:
					break;
			}
			break;
			default:
				WM_DefaultProc(pMsg);
			break;
	}
}
开发者ID:LucianZala,项目名称:SmartEmbeddedDeviceFW,代码行数:44,代码来源:menu.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GUI_SetColor函数代码示例发布时间:2022-05-30
下一篇:
C++ GUI_Mouse_Show_Safe函数代码示例发布时间: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