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


C++ WM_DeleteWindow函数代码示例

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


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

示例1: _cbCellEdit

/*********************************************************************
*
*       _cbCellEdit
*
* Function description
*   Callback function of the EDIT widget which is created above a
*   LISTVIEW cell.
*/
static void _cbCellEdit(WM_MESSAGE * pMsg) {
  CELL_EDIT_ORG   CellEditOrg;
  WM_KEY_INFO   * pKeyInfo;
  WM_HWIN         hList;
  char            acText[LEN_ITEM_TEXT];

  switch (pMsg->MsgId) {
  case WM_KEY:
    pKeyInfo = (WM_KEY_INFO *)pMsg->Data.p;
    if (pKeyInfo->PressedCnt == 0) {
      if (pKeyInfo->Key == GUI_KEY_ENTER) {
        WM_SetFocus(WM_GetParent(pMsg->hWin));
        WM_DeleteWindow(pMsg->hWin);
        break;
      }
    }
    EDIT_Callback(pMsg);
    break;
  case WM_SET_FOCUS:
    if (pMsg->Data.v == 0) {
      WM_DeleteWindow(pMsg->hWin);
    } else {
      EDIT_Callback(pMsg);
    }
    break;
  case WM_DELETE:
    EDIT_GetUserData(pMsg->hWin, &CellEditOrg, sizeof(CELL_EDIT_ORG));
    hList = WM_GetParent(pMsg->hWin);
    EDIT_GetText(pMsg->hWin, acText, LEN_ITEM_TEXT);
    LISTVIEW_SetItemTextSorted(hList, CellEditOrg.Col, CellEditOrg.Row, acText);
    break;
  default:
    EDIT_Callback(pMsg);
  }
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:43,代码来源:WIDGET_SortedListview.c

示例2: MainTask

void MainTask(void) {
  static GUI_PID_STATE OldState;
  GUI_PID_STATE        CurrentState;
  int                  tEnd;

  GUI_Init();
  BUTTON_SetReactOnLevel();
  //
  // Check if recommended memory for the sample is available
  //
  if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
    GUI_ErrorOut("Not enough memory available."); 
    return;
  }
  do {
    WM_HWIN hButton0, hButton1;
    WM_SetCallback(WM_HBKWIN, _cbBkWin);
    hButton0 = _CreateButton(100, 220, 170, 150, 5, 25, "Dashboard"    , &bmDashboard   , GUI_ID_BUTTON0);
    hButton1 = _CreateButton(370, 220, 170, 150, 5, 25, "Cash Terminal", &bmCashTerminal, GUI_ID_BUTTON1);
    WM_SetFocus(hButton0);
    tEnd = GUI_GetTime() + 4000;
    do {
      GUI_PID_GetState(&CurrentState);
      if ((OldState.x != CurrentState.x) || (OldState.y != CurrentState.y)) {
        tEnd = GUI_GetTime() + 10000;
      }
      OldState = CurrentState;
      GUI_Delay(100);
      if (GUI_GetTime() >= tEnd) {
        if (_AppSelectionOld) {
          _AppSelection = ((_AppSelectionOld - 1) ^ 1) + 1;
        } else {
          _AppSelection = APP_DASHBOARD;
        }
      }
    } while (!_AppSelection && !_Break);
    WM_DeleteWindow(hButton0);
    WM_DeleteWindow(hButton1);
    if (!_Break) {
      switch (_AppSelection) {
      case APP_DASHBOARD:
        AppDashBoard();
        break;
      case APP_CASHTERMINAL:
        AppCashTerminal();
        break;
      }
      GUI_CURSOR_Hide();
      _AppSelectionOld = _AppSelection;
      _AppSelection    = 0;
    }
  } while (!_Break);
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:53,代码来源:MainTask.c

示例3: _DemoDeleteWindow

/*******************************************************************
*
*       _DemoDeleteWindow

  Demonstrates the use of WM_DeleteWindow
*/
static void _DemoDeleteWindow(void) {
  _ChangeInfoText("WM_DeleteWindow()");
  GUI_Delay(SPEED);
  WM_DeleteWindow(_hWindow2);
  GUI_Delay(SPEED/3);
  WM_DeleteWindow(_hWindow1);
  GUI_Delay(SPEED);
  _ChangeInfoText("");
  GUI_Delay(SPEED);
  /* Restore background callback and window colors */
  WM_SetCallback(WM_HBKWIN, _cbBkWindowOld);
  _WindowColor1 = GUI_GREEN;
  _WindowColor2 = GUI_RED;
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:20,代码来源:WM_Sample.c

示例4: MainTask_AppCalendar

/*******************************************************************
*
*       MainTask
*
********************************************************************
*/
void MainTask_AppCalendar(void)
{
	WM_HWIN hWinCalendar;
	u32 curtimestamp = 0;
	struct tm currUtime;
	
	//Init Time
	curtimestamp = Time_GetRTCTimeByUnix();
	currUtime = Time_ConvUnixToCalendar(curtimestamp);
	cldDate.year = currUtime.tm_year;
	cldDate.month = currUtime.tm_mon+1;
	cldDate.day = currUtime.tm_mday;
	if (currUtime.tm_wday == 0)
		cldDate.weekday = 7;
	else cldDate.weekday = currUtime.tm_wday;

	//GUI_Init();
	hWinCalendar = WM_CreateWindow(320, 0, 320, 240, WM_CF_SHOW, _cbCalendar, 0);
	WM_SetFocus(hWinCalendar);
	_MoveShiftWindow(&hWinCalendar, MEMDEV_ANIMATION_LEFT, WM_Shift_ToLCD, 0);
	WM_EnableMemdev(hWinCalendar);

	_ShowButton(hWinCalendar);
	while (!GUI_CheckCancel(APP_Calendar))
	{
		//GUI_Delay(10);
		GUI_Exec();
		GUI_X_ExecIdle();
	}
	WM_DeleteWindow(hWinCalendar);
	hWinCalendar = 0;
}
开发者ID:fzzjoy,项目名称:GraduationProject,代码行数:38,代码来源:AppCalendar.c

示例5: _GetFileName

/*********************************************************************
*
*       _GetFileName
*
* Purpose:
*   Returns the file name of the XBF file to be used
*/
static void _GetFileName(char * pPath, unsigned MaxSize) {
  WM_HWIN hWin;
  
  /* Set default value on first call */
  if (!strlen(pPath)) {
    strcpy(pPath, "Sample\\GUI\\FONT_ShowXBF\\ExtBinFont.xbf");
  }
  /* Display small hint */
  GUI_SetFont(&GUI_Font10_ASCII);
  GUI_DispStringHCenterAt("Please enter the file name of the XBF-file:", 160, 80);
  /* Create edit widget */
  hWin = EDIT_Create(10, 120, 300, 20, 0, MaxSize, WM_CF_SHOW);
  EDIT_SetText(hWin, pPath);
  WM_SetFocus(hWin);
  /* Wait until GUI_KEY_ENTER has been pressed */
  while (GUI_GetKey() != GUI_KEY_ENTER) {
    GUI_Delay(100);
  }
  /* Get filename from EDIT widget */
  EDIT_GetText(hWin, pPath, MaxSize);
  /* Create edit widget */
  WM_DeleteWindow(hWin);
  /* Clear screen */
  GUI_ClearRect(0, 40, 319, 239);
}
开发者ID:qiurenguo2014,项目名称:youjiesun,代码行数:32,代码来源:FONT_ShowXBF.c

示例6: _cbFullScreen

/**
  * @brief  callback for Full Screen window
  * @param  pMsg: pointer to a data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbFullScreen(WM_MESSAGE * pMsg) 
{
  GUI_RECT r;
  const GUI_PID_STATE * pState;
  
  switch (pMsg->MsgId) 
  {
  case WM_PAINT:
    WM_GetInsideRect(&r);
    GUI_ClearRectEx(&r);
    break;
    
  case  WM_TOUCH:
    pState = (const GUI_PID_STATE *)pMsg->Data.p;
    if (pState) 
    {
      if (pState->Pressed == 1)
      {
        _CloseFullScreen();
        WM_DeleteWindow(pMsg->hWin);
      }
    }
    break;
    
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:33,代码来源:videoplayer_win.c

示例7: customer

/*********************************************************************
*
*       MainTask
*
**********************************************************************
*/
void customer(WM_MESSAGE * pMsg) 
{ 
	current_interface = PORTABLE_CUSTOMER;
	if(pMsg)
	{
		WM_DeleteWindow(pMsg->hWin);
#if 0
		WM_HideWindow(pMsg->hWin);
#endif
	}

    WM_SetDesktopColor(GUI_WHITE);      /* Automacally update desktop window */
    WM_SetCreateFlags(WM_CF_MEMDEV);  /* Use memory devices on all windows to avoid flicker */
    //PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
    //FRAMEWIN_SetDefaultSkin(FRAMEWIN_SKIN_FLEX);
    //PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
    //BUTTON_SetDefaultSkin(BUTTON_SKIN_FLEX);
    //CHECKBOX_SetDefaultSkin(CHECKBOX_SKIN_FLEX);
    //DROPDOWN_SetDefaultSkin(DROPDOWN_SKIN_FLEX);
    //SCROLLBAR_SetDefaultSkin(SCROLLBAR_SKIN_FLEX);
    //SLIDER_SetDefaultSkin(SLIDER_SKIN_FLEX);
    //HEADER_SetDefaultSkin(HEADER_SKIN_FLEX);
    //RADIO_SetDefaultSkin(RADIO_SKIN_FLEX);
    current_handle = GUI_CreateDialogBox(_aDialogCreate_Cus, GUI_COUNTOF(_aDialogCreate_Cus), &_cbCallback_Cus, 0, 0, 0);
	h_cus = current_handle;
}
开发者ID:weimingtom,项目名称:stm32-gui,代码行数:32,代码来源:Custormer.c

示例8: GUI_CreateDialogBox

/*********************************************************************
*
*       GUI_CreateDialogbox
*/
WM_HWIN GUI_CreateDialogBox(const GUI_WIDGET_CREATE_INFO* paWidget, int NumWidgets, WM_CALLBACK* cb, WM_HWIN hParent,
                            int x0, int y0)
{
  WM_HWIN hDialog, hDialogClient;
  hDialog = paWidget->pfCreateIndirect(paWidget, hParent, x0, y0, cb);     /* Create parent window */
  if (!hDialog) {
    return 0;
  }
  hDialogClient = WM_GetClientWindow(hDialog);
  WIDGET_OrState(hDialog, paWidget->Flags);
  WM_ShowWindow(hDialog);
  WM_ShowWindow(hDialogClient);
  while (--NumWidgets > 0) {
    WM_HWIN hChild;
    paWidget++;
    hChild = paWidget->pfCreateIndirect(paWidget, hDialogClient, 0, 0, 0);     /* Create child window */
    if (!hChild) {
      WM_DeleteWindow(hDialog);
      return 0;
    }
    WM_ShowWindow(hChild);
  }
  WM_SetFocusOnNextChild(hDialog);     /* Set the focus to the first child */
  WM_SendMessageNoPara(hDialogClient, WM_INIT_DIALOG);
  return hDialog;
}
开发者ID:Woody00h,项目名称:Particle-sensor-fixture,代码行数:30,代码来源:DIALOG.c

示例9: _DeleteAllChildren

static void _DeleteAllChildren(WM_HWIN hChild) {
  while (hChild) {
    WM_Obj* pChild = WM_H2P(hChild);
    WM_HWIN hNext = pChild->hNext;
    WM_DeleteWindow(hChild);
    hChild = hNext;
  }
}
开发者ID:uKingSky,项目名称:KingSky,代码行数:8,代码来源:wm.c

示例10: _DemoHeaderWin

/*********************************************************************
*
*       _DemoHeaderWin
*/
static void _DemoHeaderWin(void) {
  WM_HWIN hWin;
  _ChangeMainText("HEADER control inside a window");
  hWin = WM_CreateWindow(10, 80, 300, 140, WM_CF_SHOW, _cbWindow, 0);
  _hHeader = HEADER_CreateAttached(hWin, 1234, 0);
  _Demo();
  WM_DeleteWindow(hWin);
}
开发者ID:huangfeng007,项目名称:ChuangKeUnion-1st,代码行数:12,代码来源:WIDGET_Header.c

示例11: MainTask

void MainTask(void) {
  static GUI_PID_STATE OldState;
  GUI_PID_STATE        CurrentState;
  int                  tEnd;

  GUI_Init();
  do {
    WM_HWIN hButton0, hButton1;
    WM_SetCallback(WM_HBKWIN, _cbBkWin);
    hButton0 = _CreateButton(100, 220, 170, 150, 5, 25, "Dashboard"    , &bmDashboard   , GUI_ID_BUTTON0);
    hButton1 = _CreateButton(370, 220, 170, 150, 5, 25, "Cash Terminal", &bmCashTerminal, GUI_ID_BUTTON1);
    WM_SetFocus(hButton0);
    tEnd = GUI_GetTime() + 4000;
    do {
      GUI_PID_GetState(&CurrentState);
      if ((OldState.x != CurrentState.x) || (OldState.y != CurrentState.y)) {
        tEnd = GUI_GetTime() + 10000;
      }
      OldState = CurrentState;
      GUI_Delay(100);
      if (GUI_GetTime() >= tEnd) {
        if (_AppSelectionOld) {
          _AppSelection = ((_AppSelectionOld - 1) ^ 1) + 1;
        } else {
          _AppSelection = APP_DASHBOARD;
        }
      }
    } while (!_AppSelection && !_Break);
    WM_DeleteWindow(hButton0);
    WM_DeleteWindow(hButton1);
    if (!_Break) {
      switch (_AppSelection) {
      case APP_DASHBOARD:
        AppDashBoard();
        break;
      case APP_CASHTERMINAL:
        AppCashTerminal();
        break;
      }
      GUI_CURSOR_Hide();
      _AppSelectionOld = _AppSelection;
      _AppSelection    = 0;
    }
  } while (!_Break);
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:45,代码来源:MainTask.c

示例12: GUI_EndDialog

/*********************************************************************
*
*       GUI_EndDialog
*/
void GUI_EndDialog(WM_HWIN hDialog, int r) {
  WM_DIALOG_STATUS* pStatus;
  pStatus = GUI_GetDialogStatusPtr(hDialog);
  if (pStatus) {
    pStatus->ReturnValue = r;
    pStatus->Done = 1;
  }
  WM_DeleteWindow(hDialog);
}
开发者ID:Woody00h,项目名称:Particle-sensor-fixture,代码行数:13,代码来源:DIALOG.c

示例13: MainTask_AppClock

/*******************************************************************
*
*       MainTask
*
********************************************************************
*/
void MainTask_AppClock(void)
{
	WM_HWIN hWinClock;
	GUI_AUTODEV AutoDev;
	PARAM       Param;

	int hour = 0;
	time_t oldtimestamp = 0;
	time_t curtimestamp = 0;
	struct tm *currUtime;

	//Init time
	curtimestamp = time(0);
	oldtimestamp = curtimestamp;
	currUtime=localtime(&curtimestamp);

	hWinClock = WM_CreateWindowAsChild(0, 0, 320, 240, WM_HBKWIN, WM_CF_SHOW, _cbClock, 0);
	WM_SelectWindow(hWinClock);
	WM_SetCreateFlags(WM_CF_MEMDEV);
	WM_SetFocus(hWinClock);
	_MoveShiftWindow(&hWinClock, MEMDEV_ANIMATION_LEFT, WM_Shift_ToLCD, 0);

	/*hWinClock = WM_CreateWindow(0, 0, 320, 240, WM_CF_SHOW, _cbClock, 0);
	WM_SetFocus(hWinClock);
	//_MoveShiftWindow(&hWinCalendar, MEMDEV_ANIMATION_LEFT, WM_Shift_ToLCD, 0);
	WM_EnableMemdev(hWinClock);*/

	/*	GUI_SetBkColor(GUI_WHITE);
	GUI_Clear();
	GUI_SetColor(GUI_BLACK);*/

	GUI_AA_EnableHiRes();
	GUI_AA_SetFactor(MAG);
	GUI_MEMDEV_CreateAuto(&AutoDev);

	while (!GUI_CheckCancel(APP_Clock))
	{
		GUI_Delay(10);
		curtimestamp = time(0);
		currUtime = localtime(&curtimestamp);
		if (1 == curtimestamp - oldtimestamp)
		{
			Param.Angle1 = (59 - currUtime->tm_sec) * 6 * (3.1415926f / 180);
			Param.Angle2 = (3599 - ((currUtime->tm_min * 60) + (currUtime->tm_sec)))*0.1*(3.1415926f / 180);
			hour = (currUtime->tm_hour>12) ? (currUtime->tm_hour - 12) : (currUtime->tm_hour);
			Param.Angle3 = (43199 - ((hour * 3600) + (currUtime->tm_min * 60) + (currUtime->tm_sec)))*0.0083333*(3.1415926f / 180);
			GUI_RotatePolygon(Param.aPoint1, _aNeedle[0], GUI_COUNTOF(_aNeedle[0]), Param.Angle1);
			GUI_RotatePolygon(Param.aPoint2, _aNeedle[1], GUI_COUNTOF(_aNeedle[1]), Param.Angle2);
			GUI_RotatePolygon(Param.aPoint3, _aNeedle[2], GUI_COUNTOF(_aNeedle[2]), Param.Angle3);
			GUI_MEMDEV_DrawAuto(&AutoDev, &Param.AutoDevInfo, &Draw, &Param);
		}
		oldtimestamp = curtimestamp;
	}
	WM_DeleteWindow(hWinClock);
	hWinClock = 0;
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:62,代码来源:AppClock.c

示例14: _DeleteWindow

/*********************************************************************
*
*       _DeleteWindow
*/
static void _DeleteWindow(void) {
  unsigned i;
  for (i = 0; i < MAX_WINDOWS; i++) {
    if (WM_IsVisible(_ahWin[i])) {
      WM_DeleteWindow(_ahWin[i]);
      _ahWin[i] = 0;
      break;
    }
  }
}
开发者ID:caicry,项目名称:uFrame,代码行数:14,代码来源:WM_Video.c

示例15: DeleteSynthScreen

U8 DeleteSynthScreen()
{
	DeleteVoiceScreen();
	RunFramework();
	DeleteControlAssignmentsScreen();
	RunFramework();
	DeleteMIDIControlScreen();
	RunFramework();
	SynthDeleteItems();
	WM_DeleteWindow(hSynth);
	return 0;
}
开发者ID:Arakula,项目名称:Misa-Kitara-AP,代码行数:12,代码来源:SynthScreen.cpp


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