|
/*********************************************************************
* *
* SEGGER Microcontroller GmbH & Co.KG *
* Solutions for real time microcontrollerapplications *
* *
**********************************************************************
* *
* C-file generated by: *
* *
* GUI_Builder for emWin version 5.32 *
* Compiled Oct 8 2015, 11:59:02 *
* (c) 2015 Segger Microcontroller GmbH& Co. KG *
* *
**********************************************************************
* *
* Internet: http://www.segger.comSupport: support@segger.com *
* *
**********************************************************************
*/
// USER START (Optionally insertadditional includes)
// USER END
#include "DIALOG.h"
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
#define ID_FRAMEWIN_0 (GUI_ID_USER + 0x00)
#define ID_BUTTON_0 (GUI_ID_USER + 0x01)
// USER START (Optionally insertadditional defines)
// USER END
/*********************************************************************
*
* Static data
*
**********************************************************************
*/
// USER START (Optionally insertadditional static data)
// USER END
/*********************************************************************
*
* _aDialogCreate
*/
static const GUI_WIDGET_CREATE_INFO_aDialogCreate[] = {
{FRAMEWIN_CreateIndirect, "Framewin", ID_FRAMEWIN_0, 0, 0, 800, 480,0, 0x64, 0 },
{BUTTON_CreateIndirect, "Button", ID_BUTTON_0, 34, 35, 177, 52, 0,0x0, 0 },
// USER START (Optionally insert additional widgets)
// USER END
};
/*********************************************************************
*
* Static code
*
**********************************************************************
*/
// USER START (Optionally insertadditional static code)
// USER END
/*********************************************************************
*
* _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg) {
WM_HWINhItem;
int NCode;
int Id;
BUTTON_SKINFLEX_PROPS BUTTON_Props; //--------------(1)
// USER START (Optionally insert additional variables)
// USER END
switch(pMsg->MsgId) {
caseWM_INIT_DIALOG:
//
// Initialization of 'Framewin'
//
hItem =pMsg->hWin;
FRAMEWIN_SetFont(hItem, GUI_FONT_32B_ASCII);
FRAMEWIN_SetText(hItem, "armfly");
FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
//
// Initialization of 'Button'
//
hItem =WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
BUTTON_SetFont(hItem, GUI_FONT_20_1);
BUTTON_SetText(hItem, "Button");
/* 获取按钮启动状态的皮肤 */
BUTTON_GetSkinFlexProps(&BUTTON_Props,BUTTON_SKINFLEX_PI_ENABLED); //--------------(2)
BUTTON_Props.aColorFrame[0]= 0x000080FF; //--------------(3)
BUTTON_Props.aColorFrame[1]= 0x000080FF;
BUTTON_Props.aColorFrame[2]= 0x000080FF;
BUTTON_Props.aColorLower[0]= 0x000080FF;
BUTTON_Props.aColorLower[1]= 0x000080FF;
BUTTON_Props.aColorUpper[0]= 0x000080FF;
BUTTON_Props.aColorUpper[1]= 0x000080FF;
/*设置按下启动状态的皮肤色 */
BUTTON_SetSkinFlexProps(&BUTTON_Props,BUTTON_SKINFLEX_PI_ENABLED); //--------------(4)
/*设置聚焦状态的皮肤色 */
BUTTON_SetSkinFlexProps(&BUTTON_Props,BUTTON_SKINFLEX_PI_FOCUSSED); //--------------(5)
BUTTON_Props.aColorFrame[0]= GUI_GREEN;
BUTTON_Props.aColorFrame[1]= GUI_GREEN;
BUTTON_Props.aColorFrame[2]= GUI_GREEN;
BUTTON_Props.aColorLower[0]= GUI_GREEN;
BUTTON_Props.aColorLower[1]= GUI_GREEN;
BUTTON_Props.aColorUpper[0]= GUI_GREEN;
BUTTON_Props.aColorUpper[1]= GUI_GREEN;
/* 设置按下状态的皮肤色 */
BUTTON_SetSkinFlexProps(&BUTTON_Props,BUTTON_SKINFLEX_PI_PRESSED); //--------------(6)
// USER START(Optionally insert additional code for further widget initialization)
// USER END
break;
caseWM_NOTIFY_PARENT:
Id = WM_GetId(pMsg->hWinSrc);
NCode =pMsg->Data.v;
switch(Id) {
caseID_BUTTON_0: // Notifications sent by 'Button'
switch(NCode) {
caseWM_NOTIFICATION_CLICKED:
// USER START(Optionally insert code for reacting on notification message)
// USER END
break;
caseWM_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;
}
}
我网上搜的资料是这样的,然后我自己用他的函数,或者我直接调用他的界面,vs的按键始终不变都是原来默认的
|
|