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


C++ WM_DeleteTimer函数代码示例

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


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

示例1: _cbCpuWindow

/**
  * @brief  Callback routine of the CPU Window
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbCpuWindow(WM_MESSAGE * pMsg) {

  static WM_HTIMER hTimerTime;
  switch (pMsg->MsgId)
  {
  case WM_CREATE:

    /* Create timer */
    hTimerTime = WM_CreateTimer(pMsg->hWin, 0, 400, 0);
    break;

  case WM_TIMER:
    GRAPH_DATA_YT_AddValue(hData , osGetCPUUsage());
    WM_InvalidateWindow(pMsg->hWin);
    WM_RestartTimer(pMsg->Data.v, 400);

    break;

  case WM_DELETE:
    WM_DeleteTimer(hTimerTime);
    break;

  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:31,代码来源:benchmark_win.c

示例2: _cbMediaConnection

/**
  * @brief  Callback function of the media connection status
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbMediaConnection(WM_MESSAGE * pMsg) 
{
  
  static WM_HTIMER      hStatusTimer;  
  static uint8_t        prev_usb_status = 0;
   
  switch (pMsg->MsgId) 
  {
  case WM_CREATE:
    prev_usb_status = k_StorageGetStatus(USB_DISK_UNIT);    
    hStatusTimer = WM_CreateTimer(pMsg->hWin, 0, 500, 0);      
    break;
    
  case WM_TIMER:
    if(prev_usb_status != k_StorageGetStatus(USB_DISK_UNIT))
    {
      prev_usb_status = k_StorageGetStatus(USB_DISK_UNIT);
      _RefreshBrowser(hExplorerWin);
    }
    WM_RestartTimer(pMsg->Data.v, 500);
    break;
    
  case WM_DELETE:
    if(hStatusTimer != 0)
    {
      WM_DeleteTimer(hStatusTimer);
      hStatusTimer = 0;
    }
    break;   
    
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:39,代码来源:filebrowser_win.c

示例3: _cbStatus

/**
  * @brief  Callback routine of the status bar
  * @param  pMsg: pointer to a data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbStatus(WM_MESSAGE* pMsg) {
	int xSize, ySize;
	static uint8_t TempStr[50];
	static WM_HTIMER hTimerTime;
	WM_HWIN hWin;

	hWin = pMsg->hWin;
	switch (pMsg->MsgId) {
		case WM_CREATE:
			hTimerTime = WM_CreateTimer(hWin, ID_TIMER_TIME, 1000, 0);
			break;
		case WM_DELETE:
			WM_DeleteTimer(hTimerTime);
			break;
		case WM_TIMER:
			WM_InvalidateWindow(hWin);
			WM_RestartTimer(pMsg->Data.v, 0);
			break;
		case WM_PAINT:
			xSize = WM_GetWindowSizeX(hWin);
			ySize = WM_GetWindowSizeY(hWin);
			/* Draw background */
			GUI_SetColor(0x303030);
			GUI_FillRect(0, 0, xSize, ySize - 3);
			GUI_SetColor(0x808080);
			GUI_DrawHLine(ySize - 2, 0, xSize);
			GUI_SetColor(0x404040);
			GUI_DrawHLine(ySize - 1, 0, xSize);
			GUI_SetTextMode(GUI_TM_TRANS);
			GUI_SetColor(GUI_WHITE);
			GUI_SetFont(GUI_FONT_13B_ASCII);
			/* Serial port*/
			if (pdTRUE == BluetoothReady) {
				GUI_DrawBitmap(&bmICON_BluetoothStatus, xSize - 155, 0);
			}
			if (pdTRUE == GPSReady) {
				GUI_DrawBitmap(&bmICON_GPS_Status, xSize - 125, 0);
			}
			sprintf((char *)TempStr, "CPU : %d %%", FreeRTOS_GetCPUUsage());
			if (75 > FreeRTOS_GetCPUUsage()) {
				GUI_SetColor(GUI_WHITE);
			}
			else {
				GUI_SetColor(GUI_RED);
			}
			GUI_DispStringAt((char *)TempStr, 4, 4);
			GUI_SetColor(GUI_WHITE);
			break;
		default:
			WM_DefaultProc(pMsg);
		break;
	}
}
开发者ID:LucianZala,项目名称:SmartEmbeddedDeviceFW,代码行数:58,代码来源:menu.c

示例4: _cbAudioProcess

/**
  * @brief  callback for audio process
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbAudioProcess(WM_MESSAGE * pMsg) {

  uint32_t Id;
  static WM_HTIMER hProcessTimer;
  WM_HWIN hItem;
  char tmp[] = "00:00/00:00";  
  uint32_t duration;
  
  switch (pMsg->MsgId) 
  {

  case WM_CREATE:
    hProcessTimer = WM_CreateTimer(pMsg->hWin, ID_PROCESS_TIMER, 1000, 0);

    break;
    
  case WM_TIMER:
    
    Id = WM_GetTimerId(pMsg->Data.v);
   
    if(Id == ID_PROCESS_TIMER)
    {
      if(AUDIO_RECORDER_GetState() == AUDIO_RECORDER_RECORDING)
      {
        /*Set elapsed time */
        duration = AUDIO_RECORDER_GetElapsedTime();     
        sprintf((char *)tmp , "%02lu:%02lu", duration/60, duration%60 );
        
        hItem = WM_GetDialogItem(hMainWin, ID_ELAPSED_TIME);
        TEXT_SetText(hItem, tmp);  
      } 
      
      if(AUDIO_RECORDER_GetState() == AUDIO_RECORDER_PLAYING)
      {
        /*Set elapsed time */
        duration = AUDIO_RECORDER_GetTotalTime() - AUDIO_RECORDER_GetPlayedTime();
        sprintf((char *)tmp , "%02lu:%02lu", duration/60, duration%60);
        hItem = WM_GetDialogItem(hMainWin, ID_ELAPSED_TIME);
        TEXT_SetText(hItem, tmp);  
      }         
      WM_RestartTimer(pMsg->Data.v, 1000);
    }
    break; 
    
  case WM_DELETE:
    WM_DeleteTimer(hProcessTimer);
    break;
    
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:z80,项目名称:stm32f429,代码行数:57,代码来源:audio_recorder_win.c

示例5: _cbMediaConnection

/**
  * @brief  Callback function of the media connection status
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbMediaConnection(WM_MESSAGE * pMsg) 
{
  static WM_HTIMER      hStatusTimer;  
  static uint8_t        prev_usb_status = 0;
   
  switch (pMsg->MsgId) 
  {
  case WM_CREATE:
    prev_usb_status = k_StorageGetStatus(USB_DISK_UNIT);    
    hStatusTimer = WM_CreateTimer(pMsg->hWin, 0, 500, 0);      
    break;
    
  case WM_TIMER:
  if(prev_usb_status != k_StorageGetStatus(USB_DISK_UNIT))
    {
      prev_usb_status = k_StorageGetStatus(USB_DISK_UNIT);
      if(VideoList.file[file_pos].name[0] == '0')
      { 
        if(VideoPlayer_State != VIDEO_IDLE)
        {
          _StopPlay(&hvideo, &Video_File);
        }
        
        VideoList.ptr = 0;
        
        GUI_EndDialog(playbackwin, 0);
        SelLayer = 0;
        GUI_SetLayerVisEx (1, 0);
        GUI_SelectLayer(0); 
        WM_HideWindow(hFrame);        
        WM_Exec();        
        WM_DeleteWindow(hFrame);
        WM_InvalidateWindow(VideoWin);
        break; 
      }
    }
    WM_RestartTimer(pMsg->Data.v, 500);
    break;
    
  case WM_DELETE:
    if(hStatusTimer != 0)
    {
      WM_DeleteTimer(hStatusTimer);
      hStatusTimer = 0;
    }
    break;   
    
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:56,代码来源:video_player_win.c

示例6: _cbMediaConnection

/**
  * @brief  Callback function of the media connection status
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbMediaConnection(WM_MESSAGE * pMsg) 
{
  WM_HWIN hItem;
  static WM_HTIMER      hStatusTimer;  
  static uint8_t        prev_usb_status = 0;
   
  switch (pMsg->MsgId) 
  {
  case WM_CREATE:
    prev_usb_status = k_StorageGetStatus(USB_DISK_UNIT);    
    hStatusTimer = WM_CreateTimer(pMsg->hWin, 0, 500, 0);      
    break;
    
  case WM_TIMER:
    if(prev_usb_status != k_StorageGetStatus(USB_DISK_UNIT))
    {
      prev_usb_status = k_StorageGetStatus(USB_DISK_UNIT);
      if(pVideoList->file[file_pos].name[0] == '0')
      {
        if(VideoPlayer_State != VIDEO_IDLE)
        {
          _StopPlay();  
          hItem = WM_GetDialogItem(VIDEOPLAYER_hWin, ID_PROGRESS_SLIDER);
          SLIDER_SetValue(hItem, 0);
          
          hItem = WM_GetDialogItem(VIDEOPLAYER_hWin, ID_PLAY_BUTTON);
          WM_InvalidateWindow(hItem);
          WM_Update(hItem); 
          WM_InvalidateWindow(hFrame);  
        }
      }
    }
    WM_RestartTimer(pMsg->Data.v, 500);
    break;
    
  case WM_DELETE:
    if(hStatusTimer != 0)
    {
      WM_DeleteTimer(hStatusTimer);
      hStatusTimer = 0;
    }
    break;   
    
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:451506709,项目名称:automated_machine,代码行数:52,代码来源:videoplayer_win.c

示例7: _StopPlay

/**
  * @brief  Stop play 
  * @param  None
  * @retval None
  */
static void _StopPlay(GUI_MOVIE_HANDLE *hmovie, FIL * file) 
{
  
  if(hTimer != 0)
  {
    WM_DeleteTimer(hTimer);
    hTimer = 0;
  }
  
  if(*hmovie != 0)
  {
    GUI_MOVIE_Delete (*hmovie);
    *hmovie = 0;
  }
  f_close(file); 

  WM_InvalidateWindow(hFrame);  
}
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:23,代码来源:video_player_win.c

示例8: _cbMSDConnectionStatus

/**
  * @brief  Callback function of the CPU window
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbMSDConnectionStatus(WM_MESSAGE * pMsg) {
  
  static WM_HTIMER hTimerTime;
  WM_HWIN hItem;  
  static uint8_t msd_connection_Changed = 0;
  switch (pMsg->MsgId) 
  {
  case WM_CREATE:
    /* Create timer */
    hTimerTime = WM_CreateTimer(pMsg->hWin, 0, 500, 0);        
    break;
    
  case WM_TIMER:
    
    if(msd_connection_Changed != k_StorageGetStatus(MSD_DISK_UNIT))
    {
      msd_connection_Changed = k_StorageGetStatus(MSD_DISK_UNIT);
      
      if(msd_connection_Changed == 1)
      {
        hItem = WM_GetDialogItem(WM_GetParent(pMsg->hWin), ID_IMAGE2_CONNECTED);
        IMAGE_SetBitmap(hItem, &bmconnected);          
      }
      else
      {
        hItem = WM_GetDialogItem(WM_GetParent(pMsg->hWin), ID_IMAGE2_CONNECTED);
        IMAGE_SetBitmap(hItem, &bmnot_connected);  
      }
    }
       
    WM_RestartTimer(pMsg->Data.v, 500);
    break; 
    
  case WM_DELETE:
    msd_connection_Changed = 0;
    WM_DeleteTimer(hTimerTime);
    break;
    
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:47,代码来源:usbd_win.c

示例9: _cbTaskWindow

/**
  * @brief  Callback function of the Task window
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbTaskWindow(WM_MESSAGE * pMsg) {
  
  static WM_HTIMER hTimerTime; 

  switch (pMsg->MsgId) 
  {
  case WM_CREATE:
    /* Create timer */
    hTimerTime = WM_CreateTimer(pMsg->hWin, 0, 1000, 0);        
    break;
    
  case WM_TIMER:
    WM_InvalidateWindow(WM_GetParent(pMsg->hWin));
    WM_RestartTimer(pMsg->Data.v, 1000);
    break; 
    
  case WM_DELETE:
    WM_DeleteTimer(hTimerTime);
    break;
    
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:EarnestHein89,项目名称:STM32Cube_FW_F4,代码行数:29,代码来源:k_menu.c

示例10: _cbDialog


//.........这里部分代码省略.........
  case WM_NOTIFY_PARENT:
    Id = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;

    switch (Id) {
    /* Notification sent by "Button_Settings" */
    case ID_SETTINGS_BUTTON:
      switch (NCode) {
      case WM_NOTIFICATION_CLICKED:
        break;
      case WM_NOTIFICATION_RELEASED:
        GUI_CreateDialogBox(_aSettingsDialogCreate, GUI_COUNTOF(_aSettingsDialogCreate), _cbSettingsDialog, IMAGE_hWin, 0, 0);
        break;
      }
      break;

     /* Notifications sent by 'ListView' Slider */
    case ID_IMAGE_LIST:
      if(NCode == WM_NOTIFICATION_CLICKED)
      {
        hItem = WM_GetDialogItem(pMsg->hWin, ID_IMAGE_LIST);
        Index = LISTBOX_GetSel(hItem);

        if(Index < pImageList->ptr)
        {
          if(playlist_select == 0)
          {
            hPlaylistTimer = WM_CreateTimer(pMsg->hWin, ID_PLAYLIST_TIMER, 500, 0);
            playlist_select = (Index + 1);
          }

          else if(playlist_select == (Index + 1))
          {
            WM_DeleteTimer(hPlaylistTimer);
            hPlaylistTimer = 0;
            playlist_select = 0;

            if(Index < pImageList->ptr)
            {
              file_pos = Index;
              if((strstr((char *)pImageList->file[file_pos].name, ".bmp")) || (strstr((char *)pImageList->file[file_pos].name, ".BMP")))
              {
                IMAGE_Type = IMAGE_TYPE_BMP;
              }
              else if((strstr((char *)pImageList->file[file_pos].name, ".jpg")) || (strstr((char *)pImageList->file[file_pos].name, ".JPG")))
              {
                IMAGE_Type = IMAGE_TYPE_JPG;
              }
              f_close(&Image_File);
              f_open(&Image_File, (char const *)pImageList->file[file_pos].name, FA_OPEN_EXISTING | FA_READ);
              WM_InvalidateWindow(imFrame);
            }
          }
        }
      }
      break;

    /* Notification sent by "Button_Close" */
    case ID_CLOSE_BUTTON:
      switch (NCode) {
      case WM_NOTIFICATION_CLICKED:
        break;
      case WM_NOTIFICATION_RELEASED:
        f_close(&Image_File);
        k_free(pImageList);
        k_free(pFileInfo);
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:67,代码来源:imagebrowser_win.c

示例11: _cbImageWindow

/**
  * @brief  Callback function of the image frame
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbImageWindow(WM_MESSAGE * pMsg)
{
  WM_HWIN  hItem;
  GUI_RECT r;
  int Id;
  const GUI_PID_STATE * pState;

  switch (pMsg->MsgId)
  {
  case  WM_TOUCH:
    pState = (const GUI_PID_STATE *)pMsg->Data.p;

    if(pImageList->ptr > 0)
    {
      if (pState) {
        if (pState->Pressed == 1)
        {
          IMAGE_Enlarge ^= 1;
          if (IMAGE_Enlarge)
          {
            WM_AttachWindowAt(pMsg->hWin, WM_HBKWIN, 0, 0);
            WM_SetSize(pMsg->hWin, LCD_GetXSize(), LCD_GetYSize());
          }
          else
          {
            WM_AttachWindowAt(pMsg->hWin, IMAGE_hWin, 6, 6);
            WM_SetSize(pMsg->hWin, 220, 134);
          }
          WM_InvalidateWindow(pMsg->hWin);
        }
      }
    }
    break;


  case WM_PAINT:
    WM_GetInsideRect(&r);
    GUI_ClearRectEx(&r);
    if (pImageList->ptr > 0)
    {
      if(_DrawImage(&Image_File, IMAGE_Enlarge, IMAGE_Type) > 0)
      {
        f_close(&Image_File);

        GUI_ClearRectEx(&r);
        GUI_DispStringAt("Error : Image cannot be displayed", 20,  80);
        if(hTimerTime != 0)
        {
          slideshow_state = OFF;

          hItem = WM_GetDialogItem(IMAGE_hWin, ID_SLIDE_BUTTON);
          WM_InvalidateWindow(hItem);
          WM_Update(hItem);

          WM_DeleteTimer(hTimerTime);
          hTimerTime = 0;

        }
      }
    }
    break;

  case WM_TIMER:

   Id = WM_GetTimerId(pMsg->Data.v);

   if(Id == ID_SLIDER_TIMER)
   {
     if(pImageList->ptr > 1)
     {
       if (file_pos < (pImageList->ptr - 1))
       {
         file_pos++;
       }
       else if (file_pos == (pImageList->ptr - 1))
       {
         file_pos=0;
       }

       if((strstr((char *)pImageList->file[file_pos].name, ".bmp")) || (strstr((char *)pImageList->file[file_pos].name, ".BMP")))
       {
         IMAGE_Type = IMAGE_TYPE_BMP;
       }
       else if((strstr((char *)pImageList->file[file_pos].name, ".jpg")) || (strstr((char *)pImageList->file[file_pos].name, ".JPG")))
       {
         IMAGE_Type = IMAGE_TYPE_JPG;
       }

       f_close(&Image_File);
       f_open(&Image_File, (char const *)pImageList->file[file_pos].name, FA_OPEN_EXISTING | FA_READ);
       WM_InvalidateWindow(imFrame);
       hItem = WM_GetDialogItem(IMAGE_hWin, ID_IMAGE_LIST);
       LISTBOX_SetSel(hItem, file_pos);
     }

//.........这里部分代码省略.........
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:101,代码来源:imagebrowser_win.c

示例12: _cbDialog


//.........这里部分代码省略.........
      
    /* Notifications sent by 'progress' Slider */
    case ID_DURATION_SLIDER: 
      if(NCode == WM_NOTIFICATION_CLICKED)
      {
        hItem = WM_GetDialogItem(pMsg->hWin, ID_DURATION_SLIDER);
        AUDIOPLAYER_SetPosition(SLIDER_GetValue(hItem));
        
        if(PlayerSettings.b.mute == MUTE_ON)
        {
          AUDIOPLAYER_Mute(MUTE_ON);
        }
      }
      break;
      
      
    /* Notifications sent by 'ListView' Slider */
    case ID_WAVFILE_LIST: 
      if(NCode == WM_NOTIFICATION_CLICKED)
      {
        hItem = WM_GetDialogItem(pMsg->hWin, ID_WAVFILE_LIST);
        index = LISTVIEW_GetSel(hItem);
        
        if(index < pWavList->ptr)
        {
          if(playlist_select == 0)
          {
            hPlaylistTimer = WM_CreateTimer(hTimerWin, ID_PLAYLIST_TIMER, 500, 0);           
            playlist_select = (index + 1);
          }
          
          else if(playlist_select == (index + 1))
          {
            WM_DeleteTimer(hPlaylistTimer); 
            hPlaylistTimer = 0;          
            playlist_select = 0;
            
            if(index < pWavList->ptr)
            {
                
              if(AUDIOPLAYER_GetState() == AUDIOPLAYER_PLAY)
              {             
                AUDIOPLAYER_Stop();
              }
              
              PlayerSettings.b.pause = PLAY_ACTIVE;
              hItem = WM_GetDialogItem(pMsg->hWin, ID_PLAY_BUTTON);
              WM_InvalidateWindow(hItem);
              WM_Update(hItem);
              
              file_pos = index;
              _PlayFile((char *)pWavList->file[index].name); 
            }
          }
        }
      }
      break;
      
    /* Notifications sent by 'Play' Button */
    case ID_PLAY_BUTTON: 
      if(NCode == WM_NOTIFICATION_RELEASED)
      {
        
        if(AUDIOPLAYER_GetState() == AUDIOPLAYER_STOP)
        {
          if(pWavList->ptr > 0)
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:67,代码来源:audioplayer_win.c

示例13: _cbMediaConnection

/**
  * @brief  Callback function of the media connection status
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbMediaConnection(WM_MESSAGE * pMsg) 
{
  WM_HWIN hItem;
  static WM_HTIMER      hStatusTimer;  
  static uint8_t        prev_sd_status = 0;
  static uint8_t        prev_usb_status = 0;
  
  switch (pMsg->MsgId) 
  {
  case WM_CREATE:
    prev_sd_status = k_StorageGetStatus(MSD_DISK_UNIT);
    prev_usb_status = k_StorageGetStatus(USB_DISK_UNIT);    
    hStatusTimer = WM_CreateTimer(pMsg->hWin, 0, 500, 0);      
    break;
    
  case WM_TIMER:
    if(prev_sd_status != k_StorageGetStatus(MSD_DISK_UNIT))
    {
      prev_sd_status = k_StorageGetStatus(MSD_DISK_UNIT);
      if(pWavList->file[file_pos].name[0] == '1')
      {
        if(PlayerSettings.b.pause == PAUSE_ACTIVE)
        {  
          PlayerSettings.b.pause = PLAY_ACTIVE;
        } 
        AUDIOPLAYER_Stop();
        hItem = WM_GetDialogItem(AUDIOPLAYER_hWin, ID_ELAPSED_TIME);
        TEXT_SetText(hItem, "00:00");            

        hItem = WM_GetDialogItem(AUDIOPLAYER_hWin, ID_PLAY_BUTTON);
        WM_InvalidateWindow(hItem);
        WM_Update(hItem);          
      }
    }
    else if(prev_usb_status != k_StorageGetStatus(USB_DISK_UNIT))
    {
      prev_usb_status = k_StorageGetStatus(USB_DISK_UNIT);
      if(pWavList->file[file_pos].name[0] == '0')
      {
        
        if(PlayerSettings.b.pause == PAUSE_ACTIVE)
        {  
          PlayerSettings.b.pause = PLAY_ACTIVE;
        } 
        AUDIOPLAYER_Stop();
        hItem = WM_GetDialogItem(AUDIOPLAYER_hWin, ID_ELAPSED_TIME);
        TEXT_SetText(hItem, "00:00");            

        hItem = WM_GetDialogItem(AUDIOPLAYER_hWin, ID_PLAY_BUTTON);
        WM_InvalidateWindow(hItem);
        WM_Update(hItem);          
      }
    }
    WM_RestartTimer(pMsg->Data.v, 500);
    break;
    
  case WM_DELETE:
    if(hStatusTimer != 0)
    {
      WM_DeleteTimer(hStatusTimer);
      hStatusTimer = 0;
    }
    break;   
    
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:73,代码来源:audioplayer_win.c

示例14: _cbDialog

static void _cbDialog(WM_MESSAGE *pMsg)
{
	 WM_KEY_INFO *pKEY;
	 CHAR TimeID;
  switch(pMsg->MsgId)
	 {
			 case WM_PAINT:
									GUI_SetBkColor(GUI_WHITE);
									GUI_Clear();
					    GUI_SetFont(&GUI_Font30);
				     GUI_SetColor(GUI_BLACK);
				     if (Language == 0)
				         GUI_DispStringAt("自检中...",100,50);
									else GUI_DispStringAt("CHECKING...",100,50);
									break;
			 case WM_KEY:
					    pKEY = (WM_KEY_INFO*)pMsg->Data.p;
				     switch (pKEY->Key)
									{
										      case GUI_KEY_ESCAPE:
																	    WM_BringToTop(mainwin);
																     TimerIndex = 0;
																     WM_DeleteTimer(CheckTimer);
																     WM_SetFocus(mainwin);
																	break;
									}
					    break;
			 case WM_CREATE:
					    CheckText[0] = TEXT_CreateEx (150,   80,   600, 40, pMsg->hWin,WM_CF_SHOW,0,0,NULL);
				     CheckText[1] = TEXT_CreateEx (150,   120,  600, 40, pMsg->hWin,WM_CF_SHOW,0,0,NULL);
				     CheckText[2] = TEXT_CreateEx (150,   160,  600, 40, pMsg->hWin,WM_CF_SHOW,0,0,NULL);
				     CheckText[3] = TEXT_CreateEx (150,   200,  600, 40, pMsg->hWin,WM_CF_SHOW,0,0,NULL);
				     CheckText[4] = TEXT_CreateEx (150,   240,  600, 40, pMsg->hWin,WM_CF_SHOW,0,0,NULL);
				     CheckText[5] = TEXT_CreateEx (150,   280,  600, 40, pMsg->hWin,WM_CF_SHOW,0,0,NULL);
				     CheckText[6] = TEXT_CreateEx (150,   320,  600, 40, pMsg->hWin,WM_CF_SHOW,0,0,NULL);
				     CheckText[7] = TEXT_CreateEx (150,   360,  600, 40, pMsg->hWin,WM_CF_SHOW,0,0,NULL);
					    break;
				
				case WM_TIMER:
				{
					    pLanguage = &Lgucheckwin[Language];
									if (TimerIndex == 0)
									{
										  //pchecktext = "国际频道 . . . . . . . . . . . . . . . . . . . . . 通过";
										  TEXT_SetText(CheckText[0],pLanguage->CheckItem[0]);
										  WM_RestartTimer(CheckTimer,2000);
										  TimerIndex++;
									}
									else if (TimerIndex == 1)
									{
										  //pchecktext = "本地频道I. . . . . . . . . . . . . . . . . . . . . 通过";
										  TEXT_SetText(CheckText[1],pLanguage->CheckItem[1]);
										  WM_RestartTimer(CheckTimer,2000);
												TimerIndex++;
									}
									else if (TimerIndex == 2)
									{
										  //pchecktext = "本地频道II . . . . . . . . . . . . . . . . . . . . 通过";
										  TEXT_SetText(CheckText[2],pLanguage->CheckItem[2]);
										  WM_RestartTimer(CheckTimer,2000);
												TimerIndex++;
									}
									else if (TimerIndex == 3)
									{
										  //pchecktext = "中文频道 . . . . . . . . . . . . . . . . . . . . . 通过";
										  TEXT_SetText(CheckText[3],pLanguage->CheckItem[3]);
										  WM_RestartTimer(CheckTimer,2000);
												TimerIndex++;
									}
									else if (TimerIndex == 4)
									{
										  //pchecktext = "数据内存 . . . . . . . . . . . . . . . . . . . . . 通过";
										  TEXT_SetText(CheckText[4],pLanguage->CheckItem[4]);
										  WM_RestartTimer(CheckTimer,2000);
												TimerIndex++;
									}
									else if (TimerIndex == 5)
									{
										  //pchecktext = "天线单元 . . . . . . . . . . . . . . . . . . . . . 通过";
										  TEXT_SetText(CheckText[5],pLanguage->CheckItem[5]);
										  WM_RestartTimer(CheckTimer,2000);
												TimerIndex++;
									}
									else if (TimerIndex == 6)
									{
										  //pchecktext = "打印端口 . . . . . . . . . . . . . . . . . . . . . 通过";
										  TEXT_SetText(CheckText[6],pLanguage->CheckItem[6]);
										  WM_RestartTimer(CheckTimer,2000);
												TimerIndex++;
									}
									else if (TimerIndex == 7)
									{
										  //pchecktext = "报警铃声 . . . . . . . . . . . . . . . . . . . .  已执行";
										  TEXT_SetText(CheckText[7],pLanguage->CheckItem[7]);
										  WM_RestartTimer(CheckTimer,2000);
												TimerIndex = 0;
										  WM_DeleteTimer(CheckTimer);
									}
									
									break;
//.........这里部分代码省略.........
开发者ID:zkan51,项目名称:NEVTEX,代码行数:101,代码来源:CheckWin.c

示例15: _cbStatus

/**
  * @brief  Callback routine of desktop window status.
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbStatus(WM_MESSAGE * pMsg) {
  int xSize, ySize;
  static uint8_t TempStr[50];
  static WM_HTIMER hTimerTime;
	uint8_t res = 0;
  //static WM_HTIMER hSpriteTime;  

  RTC_TimeTypeDef   RTC_Time;
  RTC_DateTypeDef   RTC_DateStructure;
  uint8_t sec, min, hour, day, month;
  uint16_t year;
  WM_HWIN hWin;
	uint16_t PosDisplay;

  hWin = pMsg->hWin;
  switch (pMsg->MsgId) 
  {
  case WM_CREATE:
    hTimerTime = WM_CreateTimer(hWin, ID_TIMER_TIME, 1000, 0);
    break;
    
  case WM_DELETE:
    WM_DeleteTimer(hTimerTime);
    break;
    
  case WM_TIMER:
    if( WM_GetTimerId(pMsg->Data.v) == ID_TIMER_TIME)
    {
      WM_InvalidateWindow(hWin);
      WM_RestartTimer(pMsg->Data.v, 1000);
    }
    break;
    
  case WM_PAINT:
    xSize = WM_GetWindowSizeX(hWin);
    ySize = WM_GetWindowSizeY(hWin);
		PosDisplay = xSize;
    
		/* Draw background */
		//GUI_SetColor(0x808080);
    //GUI_SetColor(0x742E1B);
		GUI_SetColor(0x000000);
		GUI_FillRect(0, 0, xSize - 1, ySize - 1);
    
		// status
		GUI_SetTextMode(GUI_TM_TRANS);
    GUI_SetColor(GUI_WHITE);
    GUI_SetFont(&GUI_FontHZ_Song_16);
		GUI_DispStringAt( (char *)StatusText, 4, 4);
	
    /* Draw time & Date */
    GUI_SetTextMode(GUI_TM_TRANS);
    GUI_SetColor(GUI_WHITE);
    GUI_SetFont(GUI_FONT_13B_ASCII);
    //time
    k_GetTime(&RTC_Time);
    sec    =  RTC_Time.Seconds;
    min    =  RTC_Time.Minutes;
    hour   =  RTC_Time.Hours;
    sprintf((char *)TempStr, "%02d:%02d:%02d", hour , min, sec);
    //sprintf((char *)TempStr, "%02d:%02d", hour , min);
		PosDisplay-=60;
		GUI_DispStringAt((char *)TempStr, PosDisplay, 0);
		//date
    k_GetDate(&RTC_DateStructure);
    year =  RTC_DateStructure.Year + 2014;
    month =  RTC_DateStructure.Month;
    day =  RTC_DateStructure.Date;
    if((day > 0) && (day <= 31) && (month > 0)&& (month <= 12) && (year >= 1900))
    {
      sprintf((char *)TempStr, "%04d/%s/%02d", year, strMonth[month-1], day);
    }
    else
    {
      sprintf((char *)TempStr, "2014/01/01");
    }
		PosDisplay-=10;
    GUI_DispStringAt((char *)TempStr, PosDisplay, 11);
    
    /* USB */
    if(k_StorageGetStatus(USB_DISK_UNIT))
    {
       PosDisplay-=35;
       GUI_DrawBitmap(&bmusbdisk, PosDisplay, 3);
    }
		
		/* MSD */
    if(k_StorageGetStatus(MSD_DISK_UNIT))
    {
      PosDisplay-=35; 
			GUI_DrawBitmap(&bmmicrosd, PosDisplay, 3);
    }   
		
		/* CPU */
    sprintf((char *)TempStr, "%d %%", osGetCPUUsage());
//.........这里部分代码省略.........
开发者ID:wujun9959,项目名称:IMS,代码行数:101,代码来源:wt_task_gui.c


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