Exemplo n.º 1
0
/*********************************************************************
*
*       _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);
  }
}
Exemplo n.º 2
0
/**
  * @brief  Callback function of the performance dialog
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbPerformanceDialog(WM_MESSAGE * pMsg) {
  int NCode;
  int Id;
  WM_HWIN hGraph;

  GUI_RECT Rect;

  switch (pMsg->MsgId) 
  {
    
  case WM_INIT_DIALOG:

    FRAMEWIN_SetTitleVis(pMsg->hWin, 0);
    hGraph = WM_GetDialogItem(pMsg->hWin, ID_GRAPH_CPU);
    hData = GRAPH_DATA_YT_Create(GUI_LIGHTGREEN, 500, 0, 20);
    GRAPH_SetGridVis(hGraph, 1);
    GRAPH_SetBorder(hGraph, 30, 2, 2, 2); 
    GRAPH_AttachData(hGraph, hData);
    hScale = GRAPH_SCALE_Create(20, GUI_TA_RIGHT, GRAPH_SCALE_CF_VERTICAL, 25);
    GRAPH_AttachScale(hGraph, hScale);  
    GRAPH_SCALE_SetTextColor(hScale, GUI_YELLOW);
    GRAPH_SetGridDistX(hGraph, 25);
    GRAPH_SetGridDistY(hGraph, 25);
    WM_GetClientRect(&Rect);
    WM_CreateWindowAsChild(470, 0, 10, 10, pMsg->hWin, WM_CF_SHOW | WM_CF_HASTRANS, _cbCpuWindow , 0); 
    
    break;
    
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {
      
    case ID_BUTTON_HIDE: /* Notifications sent by Hide Button */
      switch(NCode) 
      {
      case WM_NOTIFICATION_RELEASED:
        
        if(hPerformance != 0)
        {
          WM_HideWindow(hPerformance);
        }
        break;
      }
      break;
    }
    break;
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
Exemplo n.º 3
0
/**
  * @brief  Callback function of the kernel log dialog
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbKernelLogDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
  int     NCode;
  int     Id;

  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:
    
    hItem = pMsg->hWin;
    FRAMEWIN_SetTitleVis(hItem, 0);
    
    hItem = WM_GetDialogItem(pMsg->hWin, ID_MULTIEDIT_KERNELLOG);
    MULTIEDIT_SetFont(hItem, GUI_FONT_8_1);
    MULTIEDIT_SetTextColor(hItem, MULTIEDIT_CI_READONLY, GUI_GREEN); 
    MULTIEDIT_SetBkColor(hItem, MULTIEDIT_CI_READONLY, GUI_BLACK); 
    MULTIEDIT_SetReadOnly(hItem, 1);
    MULTIEDIT_SetText(hItem, (char *)pLOG_CacheBuffer);
    MULTIEDIT_SetCursorOffset(hItem, LOG_IN_ptr);
    MULTIEDIT_SetAutoScrollV(hItem, 1);
    break;
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {
    case ID_BUTTON_CANCEL_KERNELLOG: /* Notifications sent by 'Cancel' button */
      switch(NCode) {
      case WM_NOTIFICATION_RELEASED:
        GUI_EndDialog(pMsg->hWin, 0); 
        hLog = 0;
        break;
      }
      break;
    case ID_MULTIEDIT_KERNELLOG: /* Notifications sent by 'Multiedit' */
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        break;
      case WM_NOTIFICATION_RELEASED:
        break;
      case WM_NOTIFICATION_VALUE_CHANGED:
        break;
      }
      break;
    }
    break;
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
Exemplo n.º 4
0
static void _cbDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;

  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:

    hItem = pMsg->hWin;
    FRAMEWIN_SetText(hItem, "welcome");
    FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    FRAMEWIN_SetTitleVis(hItem, 0);
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetFont(hItem, GUI_FONT_20B_1);
    TEXT_SetTextColor(hItem, 0x000000FF);
    TEXT_SetText(hItem, "welcome to use our system");
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetFont(hItem, GUI_FONT_16B_1);
    TEXT_SetTextColor(hItem, 0x008000FF);
    TEXT_SetText(hItem, "The elderly assistant");
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_2);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetText(hItem, "Just a moment, please. ");
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_3);
    TEXT_SetText(hItem, "second");
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    // USER START (Optionally insert additional code for further widget initialization)
    // USER END
    break;
  // USER START (Optionally insert additional message handling)
  // USER END
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
Exemplo n.º 5
0
/*********************************************************************
*
*       _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
  // USER START (Optionally insert additional variables)
  // USER END

  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:
    //
    // Initialization of 'Manager'
    //
    hItem = pMsg->hWin;
    FRAMEWIN_SetTitleVis(hItem, 0);
    // USER START (Optionally insert additional code for further widget initialization)
    // USER END
    break;
  // USER START (Optionally insert additional message handling)
  // USER END
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
Exemplo n.º 6
0
/**
  * @brief  Callback function of the process manager dialog
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbProcessManagerDialog(WM_MESSAGE * pMsg) {
  WM_HWIN  hItem;
  int      NCode;
  int      Id, Idx;

  switch (pMsg->MsgId) {
    
  case WM_INIT_DIALOG:

    hItem = pMsg->hWin;
    FRAMEWIN_SetTitleVis(hItem, 0);
    
    hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTVIEW_PROCESSMANAGER);
    LISTVIEW_AddColumn(hItem, 170, "Tasks", GUI_TA_HCENTER | GUI_TA_VCENTER);
    LISTVIEW_AddColumn(hItem, 60, "Priority", GUI_TA_HCENTER | GUI_TA_VCENTER);
    LISTVIEW_AddColumn(hItem, 70, "State", GUI_TA_HCENTER | GUI_TA_VCENTER);
    
    LISTVIEW_SetGridVis(hItem, 1);
    LISTVIEW_SetTextAlign(hItem, 0, GUI_TA_LEFT);
    LISTVIEW_SetTextAlign(hItem, 1, GUI_TA_HCENTER);
    LISTVIEW_SetTextAlign(hItem, 2, GUI_TA_HCENTER);
    HEADER_SetDragLimit(LISTVIEW_GetHeader(hItem), 1);
    LISTVIEW_SetCompareFunc(hItem, 1, LISTVIEW_CompareDec);
    LISTVIEW_SetTextColor(hItem, LISTVIEW_CI_SELFOCUS, GUI_LIGHTBLUE);  
  
    for (Idx = 0; Idx < 16 ; Idx ++)
    {
      LISTVIEW_AddRow(hItem, NULL);
    }
  
    _UpdateProcessManagerView(hItem);
    
    WM_CreateWindowAsChild(470, 0, 10, 10, pMsg->hWin, WM_CF_SHOW | WM_CF_HASTRANS, _cbTaskWindow , 0); 
    break;

  case WM_PAINT:
    hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTVIEW_PROCESSMANAGER);
    _UpdateProcessManagerView(hItem);
    break;

  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {
    case ID_BUTTON_CANCEL_PROCESSMANAGER: /* Notifications sent by 'Cancel' button */
      switch(NCode) {
      case WM_NOTIFICATION_RELEASED:
        GUI_EndDialog(pMsg->hWin, 0);
        hProcess = 0;       
        break;
      }
      break;
    case ID_LISTVIEW_PROCESSMANAGER: /* Notifications sent by 'Listview' */
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        break;
      case WM_NOTIFICATION_RELEASED:
        break;
      case WM_NOTIFICATION_SEL_CHANGED:
        break;
      }
      break;
    }
    break;
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
Exemplo n.º 7
0
/*********************************************************************
*
*       _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg)
{
    WM_HWIN hItem;
    int     NCode;
    int     Id;
    // USER START (Optionally insert additional variables)
    // USER END
    GUI_DrawBitmap(&bmlogo,40,10);
#if(Gradient_Rectangle)
    {
        GUI_DrawGradientRoundedH(220,120,580,380,20,REC_color1,REC_color2);
    }
#endif

#if(RoundedFrame)
    GUI_SetColor(GUI_GREEN);
    GUI_DrawRoundedFrame(218,118,582,382,20,3);
#endif

#if(FillRoundedRect)
    GUI_SetColor(RoundedRect);
    GUI_FillRoundedRect(220,120,580,380,20);
#endif

    switch (pMsg->MsgId)
        {
        case WM_INIT_DIALOG:
            //
            // Initialization of 'inuse'
            //


            hItem = pMsg->hWin;
            FRAMEWIN_SetTitleVis(hItem, 0);
            FRAMEWIN_SetClientColor( hItem, framewin_backcolor);
            FRAMEWIN_SetFont(hItem, GUI_FONT_8_1);
            FRAMEWIN_SetText(hItem, "Framewin");
            FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
            FRAMEWIN_SetTextColor(hItem, 0x00000000);


            hItem = pMsg->hWin;
            FRAMEWIN_SetTitleVis(hItem, 0);

            hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_1);
            BUTTON_SetFont(hItem, &GUI_Fonthz_song30);
            BUTTON_SetText(hItem, "返回 ");
#if(Button_3Dskin)
            BUTTON_SetSkin(hItem,BUTTON_SKIN_FLEX);
#endif
#if(!Button_3Dskin)
            BUTTON_SetBkColor( hItem,BUTTON_CI_UNPRESSED,Button_unpress_color);
            BUTTON_SetBkColor( hItem,BUTTON_CI_PRESSED,Button_press_color);
#endif

            //
            // Initialization of 'Button'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
            BUTTON_SetFont(hItem, &GUI_Fonthz_song30);
            BUTTON_SetText(hItem, "停止充电 ");
#if(Button_3Dskin)
            BUTTON_SetSkin(hItem,BUTTON_SKIN_FLEX);
#endif
#if(!Button_3Dskin)
            BUTTON_SetBkColor( hItem,BUTTON_CI_UNPRESSED,Button_unpress_color);
            BUTTON_SetBkColor( hItem,BUTTON_CI_PRESSED,Button_press_color);
#endif
            //
            // Initialization of 'Button'
            //
            //
            // Initialization of 'Edit'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0);
            EDIT_EnableBlink( hItem,1 ,0);
            EDIT_SetDecMode(hItem,0,0,99,0,0);
            EDIT_SetFont(hItem, GUI_FONT_32_ASCII);
            EDIT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
            //
            // Initialization of 'Edit'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_1);
            EDIT_EnableBlink( hItem,1 ,0);
            EDIT_SetDecMode(hItem,0,0,99,0,0);
            EDIT_SetFont(hItem, GUI_FONT_32_ASCII);
            EDIT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
            EDIT_SetTextColor(hItem, EDIT_CI_ENABLED, 0x00000000);
            //
            // Initialization of 'Edit'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_2);
            EDIT_EnableBlink( hItem,1 ,0);
            EDIT_SetDecMode(hItem,0,0,99,0,0);
            EDIT_SetFont(hItem, GUI_FONT_32_ASCII);
            EDIT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
            EDIT_SetTextColor(hItem, EDIT_CI_ENABLED, 0x00000000);
            //
            // Initialization of 'Edit'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_3);
            EDIT_EnableBlink( hItem,1 ,0);
            EDIT_SetDecMode(hItem,0,0,9999,0,0);
            EDIT_SetFont(hItem, GUI_FONT_32_ASCII);
            EDIT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
            EDIT_SetTextColor(hItem, EDIT_CI_ENABLED, 0x00000000);
            //
            // Initialization of 'cddianliang'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
            TEXT_SetFont(hItem, &GUI_Fonthz_song24);

            TEXT_SetText(hItem, "使用电量 ");
            TEXT_SetTextAlign(hItem, GUI_TA_RIGHT);
            TEXT_SetTextColor(hItem, 0x00000000);
            //
            // Initialization of 'Text'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
            TEXT_SetFont(hItem, &GUI_Fonthz_song24);

            TEXT_SetText(hItem, "使用时间 ");
            TEXT_SetTextColor(hItem, 0x00000000);
            TEXT_SetTextAlign(hItem, GUI_TA_RIGHT);
            //
            // Initialization of 'Text'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_2);
            TEXT_SetFont(hItem, &GUI_Fonthz_song24);

            TEXT_SetText(hItem, "消费金额 ");
            TEXT_SetTextAlign(hItem, GUI_TA_RIGHT);
            TEXT_SetTextColor(hItem, 0x00000000);
            //
            // Initialization of 'Text'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_3);
            TEXT_SetFont(hItem, &GUI_Fonthz_song24);

            TEXT_SetText(hItem, "账户余额 ");
            TEXT_SetTextAlign(hItem, GUI_TA_RIGHT);
            TEXT_SetTextColor(hItem, 0x00000000);

            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_4);
            TEXT_SetTextAlign(hItem, GUI_TA_LEFT | GUI_TA_TOP);
            TEXT_SetText(hItem, "安徽绿建科技有限公司 ");
            TEXT_SetTextColor(hItem, 0x00000000);
            TEXT_SetFont(hItem, &GUI_FontSong_60);
            //
            // Initialization of 'Text'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_5);
            TEXT_SetTextAlign(hItem, GUI_TA_LEFT | GUI_TA_TOP);
            TEXT_SetTextColor(hItem, 0x00000000);
            TEXT_SetText(hItem, "ANHUI GREEN BUILDING TECHNOLOGY CO.,LTD.");
            TEXT_SetFont(hItem, GUI_FONT_24_ASCII);
            // USER START (Optionally insert additional code for further widget initialization)
            // USER END
            break;
        case WM_NOTIFY_PARENT:
            Id    = WM_GetId(pMsg->hWinSrc);
            NCode = pMsg->Data.v;
            switch(Id)
                {
                case ID_BUTTON_0: // Notifications sent by 'Button'
                    switch(NCode)
                        {
                        case WM_NOTIFICATION_CLICKED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_RELEASED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
//                        op=ensure;
//                        handle_button();
                        
                        GUI_EndDialog( pMsg->hWin,1);
                        Createensure();
                            break;
                            // USER START (Optionally insert additional code for further notification handling)
                            // USER END
                        }
                    break;
                case ID_BUTTON_1: // Notifications sent by 'Button'
                    switch(NCode)
                        {
                        case WM_NOTIFICATION_CLICKED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_RELEASED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            GUI_EndDialog( pMsg->hWin,1);
                            Createwindow0();
                            break;
                            // USER START (Optionally insert additional code for further notification handling)
                            // USER END
                        }
                    break;
                case ID_EDIT_0: // Notifications sent by 'Edit'
                    switch(NCode)
                        {
                        case WM_NOTIFICATION_CLICKED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_RELEASED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_VALUE_CHANGED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                            // USER START (Optionally insert additional code for further notification handling)
                            // USER END
                        }
                    break;
                case ID_EDIT_1: // Notifications sent by 'Edit'
                    switch(NCode)
                        {
                        case WM_NOTIFICATION_CLICKED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_RELEASED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_VALUE_CHANGED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                            // USER START (Optionally insert additional code for further notification handling)
                            // USER END
                        }
                    break;
                case ID_EDIT_2: // Notifications sent by 'Edit'
                    switch(NCode)
                        {
                        case WM_NOTIFICATION_CLICKED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_RELEASED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_VALUE_CHANGED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                            // USER START (Optionally insert additional code for further notification handling)
                            // USER END
                        }
                    break;
                case ID_EDIT_3: // Notifications sent by 'Edit'
                    switch(NCode)
                        {
                        case WM_NOTIFICATION_CLICKED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_RELEASED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_VALUE_CHANGED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                            // USER START (Optionally insert additional code for further notification handling)
                            // USER END
                        }
                    break;
                    // USER START (Optionally insert additional code for further Ids)
                    // USER END
                }
            break;
            // USER START (Optionally insert additional message handling)
            // USER END
        default:
            WM_DefaultProc(pMsg);
            break;
        }
}
Exemplo n.º 8
0
static void InitDialog(WM_MESSAGE * pMsg)
{
    WM_HWIN hWin = pMsg->hWin;
    //
    //FRAMEWIN
    //
    FRAMEWIN_SetTitleVis(hWin,0);
    //
    //GUI_ID_BUTTON7
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON7),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_BUTTON4
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON4),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_BUTTON5
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON5),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_BUTTON3
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON3),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_BUTTON6
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON6),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_BUTTON2
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON2),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_BUTTON0
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON0),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_BUTTON1
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON1),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_CANCEL
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_CANCEL),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_OK
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_OK),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_BUTTON8
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON8),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_BUTTON9
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON9),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_EDIT0
    //
    EDIT_SetFont(WM_GetDialogItem(hWin,GUI_ID_EDIT0),&GUI_FontHZ_SongTi_16);
    EDIT_SetDecMode(WM_GetDialogItem(hWin,GUI_ID_EDIT0),0,0,999999999,0,0);

}
Exemplo n.º 9
0
/*********************************************************************
*
*       _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg)
{
    WM_HWIN hItem;
    int     NCode;
    int     Id;
    // USER START (Optionally insert additional variables)
    // USER END
    GUI_DrawBitmap(&bmlogo,40,10);
#if(Gradient_Rectangle)
    {
        GUI_DrawGradientRoundedH(220,120,580,380,20,REC_color1,REC_color2);
    }
#endif

#if(RoundedFrame)
    GUI_SetColor(GUI_GREEN);
    GUI_DrawRoundedFrame(218,118,582,382,20,3);
#endif

#if(FillRoundedRect)
    GUI_SetColor(RoundedRect);
    GUI_FillRoundedRect(220,120,580,380,20);
#endif

    switch (pMsg->MsgId)
        {
        case WM_INIT_DIALOG:
            //
            // Initialization of 'ICcard'
            //
            hItem = pMsg->hWin;
            FRAMEWIN_SetTitleVis(hItem, 0);
            FRAMEWIN_SetClientColor( hItem, BACKCOLOR);
            FRAMEWIN_SetFont(hItem, GUI_FONT_8_1);
            FRAMEWIN_SetText(hItem, "Framewin");
            FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
            FRAMEWIN_SetTextColor(hItem, 0x00000000);
            //
            // Initialization of 'Button'
            //
//    hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
//    BUTTON_SetFont(hItem, &GUI_Fonthz_song30);
//    BUTTON_SetText(hItem, "返回 ");
//  #if(Button_3Dskin)
//            BUTTON_SetSkin(hItem,BUTTON_SKIN_FLEX);
//#endif
//#if(!Button_3Dskin)
//            BUTTON_SetBkColor( hItem,BUTTON_CI_UNPRESSED,Button_unpress_color);
//            BUTTON_SetBkColor( hItem,BUTTON_CI_PRESSED,Button_press_color);
//#endif
            //
            // Initialization of 'Button'
            //
//            hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_1);
//            BUTTON_SetFont(hItem, GUI_FONT_13_1);
//            BUTTON_SetText(hItem, "exit");
//#if(Button_3Dskin)
//            BUTTON_SetSkin(hItem,BUTTON_SKIN_FLEX);
//#endif
//#if(!Button_3Dskin)
//            BUTTON_SetBkColor( hItem,BUTTON_CI_UNPRESSED,Button_unpress_color);
//            BUTTON_SetBkColor( hItem,BUTTON_CI_PRESSED,Button_press_color);
//#endif
            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
            TEXT_SetTextAlign(hItem, GUI_TA_LEFT | GUI_TA_TOP);
            TEXT_SetText(hItem, "安徽绿建科技有限公司 ");
            TEXT_SetTextColor(hItem, 0x00000000);
            TEXT_SetFont(hItem, &GUI_FontSong_60);
            //
            // Initialization of 'Text'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
            TEXT_SetTextAlign(hItem, GUI_TA_LEFT | GUI_TA_TOP);
            TEXT_SetTextColor(hItem, 0x00000000);
            TEXT_SetText(hItem, "ANHUI GREEN BUILDING TECHNOLOGY CO.,LTD.");
            TEXT_SetFont(hItem, GUI_FONT_24_ASCII);

            //
            // Initialization of 'Text'
            //
            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_2);
            TEXT_SetFont(hItem, &GUI_Fonthz_song30);
            TEXT_SetWrapMode(hItem,GUI_WRAPMODE_WORD);
            TEXT_SetText(hItem, "您好像没有刷卡,系统将在2S后自动退出 ");
            TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
            TEXT_SetTextColor(hItem, 0x00FFFFFF);
            // USER START (Optionally insert additional code for further widget initialization)
            // USER END
            break;
        case WM_NOTIFY_PARENT:
            Id    = WM_GetId(pMsg->hWinSrc);
            NCode = pMsg->Data.v;
            switch(Id)
                {
                case ID_BUTTON_0: // Notifications sent by 'Button'
                    switch(NCode)
                        {
                        case WM_NOTIFICATION_CLICKED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_RELEASED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                            // USER START (Optionally insert additional code for further notification handling)
                            // USER END
                        }
                    break;
                case ID_BUTTON_1: // Notifications sent by 'Button'
                    switch(NCode)
                        {
                        case WM_NOTIFICATION_CLICKED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                        case WM_NOTIFICATION_RELEASED:
                            // USER START (Optionally insert code for reacting on notification message)
                            // USER END
                            break;
                            // USER START (Optionally insert additional code for further notification handling)
                            // USER END
                        }
                    break;
                    // USER START (Optionally insert additional code for further Ids)
                    // USER END
                }
            break;
            // USER START (Optionally insert additional message handling)
            // USER END
        default:
            WM_DefaultProc(pMsg);
            break;
        }
}
Exemplo n.º 10
0
/*********************************************************************
*
*       _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
	WM_HWIN hItem_Drop_Years;
	WM_HWIN hItem_Drop_Month;
	WM_HWIN hItem_Drop_day;
	WM_HWIN hItem_Drop_hour;
	WM_HWIN hItem_Drop_min;
  int     NCode;
  int     Id;
	char out[10];
	int i;
	char * dropString;
	int DropdownSecItemNum;
  // USER START (Optionally insert additional variables)
  // USER END

  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:
    //
    // Initialization of 'Framewin'
    //
    hItem = pMsg->hWin;
    FRAMEWIN_SetTitleVis(hItem, 0);
    //
    // Initialization of 'Dropdown'
    //
    hItem_Drop_Years = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_0);
	  DROPDOWN_SetListHeight(hItem_Drop_Years, 100);
	  DROPDOWN_SetItemSpacing(hItem_Drop_Years,10);
	  DROPDOWN_SetAutoScroll(hItem_Drop_Years,1);
	  DROPDOWN_SetFont(hItem_Drop_Years, GUI_FONT_13B_1);
	  DROPDOWN_AddString(hItem_Drop_Years, "2016");
	  DROPDOWN_AddString(hItem_Drop_Years, "2017");
	  DROPDOWN_AddString(hItem_Drop_Years, "2018");
		DROPDOWN_AddString(hItem_Drop_Years, "2019");
		DROPDOWN_AddString(hItem_Drop_Years, "2020");
		DROPDOWN_AddString(hItem_Drop_Years, "2021");
		DROPDOWN_AddString(hItem_Drop_Years, "2022");
		DROPDOWN_AddString(hItem_Drop_Years, "2023");
		DROPDOWN_AddString(hItem_Drop_Years, "2024");
		DROPDOWN_AddString(hItem_Drop_Years, "2025");
		DROPDOWN_AddString(hItem_Drop_Years, "2026");
		DROPDOWN_AddString(hItem_Drop_Years, "2027");
		DROPDOWN_AddString(hItem_Drop_Years, "2028");
		DROPDOWN_AddString(hItem_Drop_Years, "2029");
		DROPDOWN_AddString(hItem_Drop_Years, "2030");
		DROPDOWN_SetScrollbarWidth(hItem_Drop_Years,10);

    //
    // Initialization of 'Dropdown'
    //
    hItem_Drop_Month = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_1);
		DROPDOWN_SetListHeight(hItem_Drop_Month, 100);
	  DROPDOWN_SetItemSpacing(hItem_Drop_Month,10);
	  DROPDOWN_SetAutoScroll(hItem_Drop_Month,1);
    DROPDOWN_AddString(hItem_Drop_Month, "1");
		DROPDOWN_AddString(hItem_Drop_Month, "2");
		DROPDOWN_AddString(hItem_Drop_Month, "3");
		DROPDOWN_AddString(hItem_Drop_Month, "4");
		DROPDOWN_AddString(hItem_Drop_Month, "5");
		DROPDOWN_AddString(hItem_Drop_Month, "6");
		DROPDOWN_AddString(hItem_Drop_Month, "7");
		DROPDOWN_AddString(hItem_Drop_Month, "8");
		DROPDOWN_AddString(hItem_Drop_Month, "9");
		DROPDOWN_AddString(hItem_Drop_Month, "10");
		DROPDOWN_AddString(hItem_Drop_Month, "11");
		DROPDOWN_AddString(hItem_Drop_Month, "12");
		DROPDOWN_SetScrollbarWidth(hItem_Drop_Month,10);
		
    //
    // Initialization of 'Dropdown'
    //
    hItem_Drop_day = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_2);
    DROPDOWN_SetListHeight(hItem_Drop_day, 100);
	  DROPDOWN_SetItemSpacing(hItem_Drop_day,10);
	  DROPDOWN_SetAutoScroll(hItem_Drop_day,1);
    DROPDOWN_AddString(hItem_Drop_day, "1");
		DROPDOWN_AddString(hItem_Drop_day, "2");
		DROPDOWN_AddString(hItem_Drop_day, "3");
		DROPDOWN_AddString(hItem_Drop_day, "4");
		DROPDOWN_AddString(hItem_Drop_day, "5");
		DROPDOWN_AddString(hItem_Drop_day, "6");
		DROPDOWN_AddString(hItem_Drop_day, "7");
		DROPDOWN_AddString(hItem_Drop_day, "8");
		DROPDOWN_AddString(hItem_Drop_day, "9");
		DROPDOWN_AddString(hItem_Drop_day, "10");
		DROPDOWN_AddString(hItem_Drop_day, "11");
		DROPDOWN_AddString(hItem_Drop_day, "12");
		DROPDOWN_AddString(hItem_Drop_day, "13");
		DROPDOWN_AddString(hItem_Drop_day, "14");
		DROPDOWN_AddString(hItem_Drop_day, "15");
		DROPDOWN_AddString(hItem_Drop_day, "16");
		DROPDOWN_AddString(hItem_Drop_day, "17");
		DROPDOWN_AddString(hItem_Drop_day, "18");
		DROPDOWN_AddString(hItem_Drop_day, "19");
		DROPDOWN_AddString(hItem_Drop_day, "20");
		DROPDOWN_AddString(hItem_Drop_day, "21");
		DROPDOWN_AddString(hItem_Drop_day, "22");
		DROPDOWN_AddString(hItem_Drop_day, "23");
		DROPDOWN_AddString(hItem_Drop_day, "24");
		DROPDOWN_AddString(hItem_Drop_day, "25");
		DROPDOWN_AddString(hItem_Drop_day, "26");
		DROPDOWN_AddString(hItem_Drop_day, "27");
		DROPDOWN_AddString(hItem_Drop_day, "28");
		DROPDOWN_AddString(hItem_Drop_day, "29");
		DROPDOWN_AddString(hItem_Drop_day, "30");
		DROPDOWN_AddString(hItem_Drop_day, "31");
		DROPDOWN_SetScrollbarWidth(hItem_Drop_day,10);
    //
    // Initialization of 'Button'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
    BUTTON_SetText(hItem, "ok");
    BUTTON_SetFont(hItem, GUI_FONT_20_1);
    //
    // Initialization of 'Button'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_1);
    BUTTON_SetText(hItem, "skip");
    BUTTON_SetFont(hItem, GUI_FONT_20_1);
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetFont(hItem, GUI_FONT_20_1);
    TEXT_SetText(hItem, "year");
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetText(hItem, "month");
    TEXT_SetFont(hItem, GUI_FONT_20_1);
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_2);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetFont(hItem, GUI_FONT_20_1);
    TEXT_SetText(hItem, "day");
    //
    // Initialization of 'Dropdown'
    //
    hItem_Drop_hour = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_3);
    DROPDOWN_SetListHeight(hItem_Drop_hour, 100);
	  DROPDOWN_SetItemSpacing(hItem_Drop_hour,10);
	  DROPDOWN_SetAutoScroll(hItem_Drop_hour,1);
    DROPDOWN_AddString(hItem_Drop_hour, "1");
		DROPDOWN_AddString(hItem_Drop_hour, "2");
		DROPDOWN_AddString(hItem_Drop_hour, "3");
		DROPDOWN_AddString(hItem_Drop_hour, "4");
		DROPDOWN_AddString(hItem_Drop_hour, "5");
		DROPDOWN_AddString(hItem_Drop_hour, "6");
		DROPDOWN_AddString(hItem_Drop_hour, "7");
		DROPDOWN_AddString(hItem_Drop_hour, "8");
		DROPDOWN_AddString(hItem_Drop_hour, "9");
		DROPDOWN_AddString(hItem_Drop_hour, "10");
		DROPDOWN_AddString(hItem_Drop_hour, "11");
		DROPDOWN_AddString(hItem_Drop_hour, "12");
		DROPDOWN_AddString(hItem_Drop_hour, "13");
		DROPDOWN_AddString(hItem_Drop_hour, "14");
		DROPDOWN_AddString(hItem_Drop_hour, "15");
		DROPDOWN_AddString(hItem_Drop_hour, "16");
		DROPDOWN_AddString(hItem_Drop_hour, "17");
		DROPDOWN_AddString(hItem_Drop_hour, "18");
		DROPDOWN_AddString(hItem_Drop_hour, "19");
		DROPDOWN_AddString(hItem_Drop_hour, "20");
		DROPDOWN_AddString(hItem_Drop_hour, "21");
		DROPDOWN_AddString(hItem_Drop_hour, "22");
		DROPDOWN_AddString(hItem_Drop_hour, "23");
		DROPDOWN_AddString(hItem_Drop_hour, "24");
		DROPDOWN_SetScrollbarWidth(hItem_Drop_hour,10);
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_3);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetText(hItem, "hour");
    TEXT_SetFont(hItem, GUI_FONT_20_1);
		
		
		
		
		//
		//   drop4  min
		//
		
		hItem_Drop_min = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_4);
    DROPDOWN_SetListHeight(hItem_Drop_min, 100);
	  DROPDOWN_SetItemSpacing(hItem_Drop_min,10);
	  DROPDOWN_SetAutoScroll(hItem_Drop_min,1);
    DROPDOWN_AddString(hItem_Drop_min, "1");
		DROPDOWN_AddString(hItem_Drop_min, "2");
		DROPDOWN_AddString(hItem_Drop_min, "3");
		DROPDOWN_AddString(hItem_Drop_min, "4");
		DROPDOWN_AddString(hItem_Drop_min, "5");
		DROPDOWN_AddString(hItem_Drop_min, "6");
		DROPDOWN_AddString(hItem_Drop_min, "7");
		DROPDOWN_AddString(hItem_Drop_min, "8");
		DROPDOWN_AddString(hItem_Drop_min, "9");
		DROPDOWN_AddString(hItem_Drop_min, "10");
		DROPDOWN_AddString(hItem_Drop_min, "11");
		DROPDOWN_AddString(hItem_Drop_min, "12");
		DROPDOWN_AddString(hItem_Drop_min, "13");
		DROPDOWN_AddString(hItem_Drop_min, "14");
		DROPDOWN_AddString(hItem_Drop_min, "15");
		DROPDOWN_AddString(hItem_Drop_min, "16");
		DROPDOWN_AddString(hItem_Drop_min, "17");
		DROPDOWN_AddString(hItem_Drop_min, "18");
		DROPDOWN_AddString(hItem_Drop_min, "19");
		DROPDOWN_AddString(hItem_Drop_min, "20");
		DROPDOWN_AddString(hItem_Drop_min, "21");
		DROPDOWN_AddString(hItem_Drop_min, "22");
		DROPDOWN_AddString(hItem_Drop_min, "23");
		DROPDOWN_AddString(hItem_Drop_min, "24");
    DROPDOWN_AddString(hItem_Drop_min, "25");
		DROPDOWN_AddString(hItem_Drop_min, "26");
		DROPDOWN_AddString(hItem_Drop_min, "27");
		DROPDOWN_AddString(hItem_Drop_min, "28");
		DROPDOWN_AddString(hItem_Drop_min, "29");
		DROPDOWN_AddString(hItem_Drop_min, "30");
		DROPDOWN_AddString(hItem_Drop_min, "31");
		DROPDOWN_AddString(hItem_Drop_min, "32");
		DROPDOWN_AddString(hItem_Drop_min, "33");
		DROPDOWN_AddString(hItem_Drop_min, "34");
		DROPDOWN_AddString(hItem_Drop_min, "35");
		DROPDOWN_AddString(hItem_Drop_min, "36");
		DROPDOWN_AddString(hItem_Drop_min, "37");
		DROPDOWN_AddString(hItem_Drop_min, "38");
		DROPDOWN_AddString(hItem_Drop_min, "39");
		DROPDOWN_AddString(hItem_Drop_min, "40");
		DROPDOWN_AddString(hItem_Drop_min, "41");
		DROPDOWN_AddString(hItem_Drop_min, "42");
		DROPDOWN_AddString(hItem_Drop_min, "43");
		DROPDOWN_AddString(hItem_Drop_min, "44");
		DROPDOWN_AddString(hItem_Drop_min, "45");
		DROPDOWN_AddString(hItem_Drop_min, "46");
		DROPDOWN_AddString(hItem_Drop_min, "47");
		DROPDOWN_AddString(hItem_Drop_min, "48");
    DROPDOWN_AddString(hItem_Drop_min, "49");
		DROPDOWN_AddString(hItem_Drop_min, "50");
		DROPDOWN_AddString(hItem_Drop_min, "51");
		DROPDOWN_AddString(hItem_Drop_min, "52");
		DROPDOWN_AddString(hItem_Drop_min, "53");
		DROPDOWN_AddString(hItem_Drop_min, "54");
		DROPDOWN_AddString(hItem_Drop_min, "55");
		DROPDOWN_AddString(hItem_Drop_min, "56");
		DROPDOWN_AddString(hItem_Drop_min, "57");
		DROPDOWN_AddString(hItem_Drop_min, "58");
		DROPDOWN_AddString(hItem_Drop_min, "59");
		DROPDOWN_AddString(hItem_Drop_min, "60");
		DROPDOWN_SetScrollbarWidth(hItem_Drop_min,10);
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_4);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetText(hItem, "min");
    TEXT_SetFont(hItem, GUI_FONT_20_1);
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_5);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetFont(hItem, GUI_FONT_16B_ASCII);
    TEXT_SetText(hItem, "please set current time");
    // USER START (Optionally insert additional code for further widget initialization)
    // USER END
    break;
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {
    case ID_DROPDOWN_0: // Notifications sent by 'Dropdown'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:

        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:

				//hItemIndex = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_0);
				//in = getDropIndex;
//			  Dropitem =  DROPDOWN_GetItemText(hItem,getDropIndex,"123",3);
//			  in = Dropitem;
						 //hItemIndex = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_0);
			 // sprintf(out, " %d" , in);
//			  DROPDOWN_AddString(hItem,out);

			
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_SEL_CHANGED:

        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_DROPDOWN_1: // Notifications sent by 'Dropdown'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
				
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_SEL_CHANGED:

        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_DROPDOWN_2: // Notifications sent by 'Dropdown'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_SEL_CHANGED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_BUTTON_0: // Notifications sent by 'Button'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
				hItem = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_0);
				getDropIndex = DROPDOWN_GetSel(hItem);  //获取当前选择的下表
			  getDropIndex = getDropIndex + startYear;
			  hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_6);
				TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
				TEXT_SetFont(hItem, GUI_FONT_20_1);
			  sprintf(out," %d",getDropIndex);
				TEXT_SetText(hItem, out);
			
				hItem = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_1);
				getDropIndexMonth = DROPDOWN_GetSel(hItem);
			  getDropIndexMonth = getDropIndexMonth + startMonth;
			
				hItem = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_2);
				getDropIndexDay = DROPDOWN_GetSel(hItem);
			  getDropIndexDay = getDropIndexDay + startDay;
	
				hItem = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_3);
				getDropIndexHour = DROPDOWN_GetSel(hItem);
			  getDropIndexHour = getDropIndexHour + startHour;		

				hItem = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_4);
				getDropIndexMin = DROPDOWN_GetSel(hItem);
			  getDropIndexMin = getDropIndexMin + startMin;	
				
				
			  //Dropitem =  DROPDOWN_GetItemText(hItem,getDropIndex,"123",3);
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
				//index = 1;                //index为1时,删除界面
			
			
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_BUTTON_1: // Notifications sent by 'Button'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
				index = 1;
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_DROPDOWN_3: // Notifications sent by 'Dropdown'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
				
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_SEL_CHANGED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    case ID_DROPDOWN_4: // Notifications sent by 'Dropdown'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_SEL_CHANGED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    // USER START (Optionally insert additional code for further Ids)
    // USER END
    }
    break;
  // USER START (Optionally insert additional message handling)
  // USER END
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}