| 
 
初级会员 
 
	积分96金钱96 注册时间2017-7-25在线时间26 小时 | 
 
1金钱 
| #include "GUI.h" static void cbBackGroundWin(WM_MESSAGE *PMsg)
 {
 switch (pMsg->MsgId) {
 case WM_PAINT:
 GUI_Clear();
 break;
 default:
 WM_DefaultProc(pMsg);
 }
 }
 static void cbForegroundWin(WM_MESSAGE* pMsg)
 {
 switch (pMsg->MsgId) {
 case WM_PAINT:
 GUI_SetBkColor(GUI_GREEN);
 GUI_Clear();
 GUI_DispString("Foreground window");
 break;
 default:
 WM_DefaultProc(pMsg);
 }
 }
 static void DemoRedraw(void)
 {
 GUI_HWIN hWnd;
 while(1) {
 /* Create foreground window */
 hWnd = WM_CreateWindow(10, 10, 100, 100, WM_CF_SHOW, cbForegroundWin, 0);
 /* Show foreground window */
 GUI_Delay(1000);
 /* Delete foreground window */
 WM_DeleteWindow(hWnd);
 GUI_DispStringAt("Background of window has not been redrawn", 10, 10);
 /* Wait a while, background will not be redrawn */
 GUI_Delay(1000);
 GUI_Clear();
 /* Set callback for Background window */
 WM_SetCallback(WM_HBKWIN, cbBackGroundWin);
 /* Create foreground window */
 hWnd = WM_CreateWindow(10, 10, 100, 100,WM_CF_SHOW, cbForegroundWin, 0);
 /* Show foreground window */
 GUI_Delay(1000);
 /* Delete foreground window */
 WM_DeleteWindow(hWnd);
 /* Wait a while, background will be redrawn */
 GUI_Delay(1000);
 /* Delete callback for Background window */
 WM_SetCallback(WM_HBKWIN, 0);
 }
 }
 
 void MainTask(void) {
 GUI_Init();
 //DemoRedraw();
 }
 
 错误        1        error C2143: 语法错误 : 缺少“)”(在“*”的前面)        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        2
 错误        2        error C2143: 语法错误 : 缺少“{”(在“*”的前面)        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        2
 错误        3        error C2059: 语法错误 : “)”        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        2
 错误        4        error C2054: 在“PMsg”之后应输入“(”        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        3
 错误        5        error C2143: 语法错误 : 缺少“)”(在“*”的前面)        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        12
 错误        6        error C2143: 语法错误 : 缺少“{”(在“*”的前面)        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        12
 错误        7        error C2059: 语法错误 : “)”        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        12
 错误        8        error C2054: 在“pMsg”之后应输入“(”        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        13
 警告        9        warning C4013: “WM_CreateWindow”未定义;假设外部返回 int        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        29
 错误        10        error C2065: “WM_CF_SHOW”: 未声明的标识符        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        29
 错误        11        error C2065: “cbForegroundWin”: 未声明的标识符        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        29
 警告        12        warning C4013: “WM_DeleteWindow”未定义;假设外部返回 int        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        33
 警告        13        warning C4013: “WM_SetCallback”未定义;假设外部返回 int        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        39
 错误        14        error C2065: “WM_HBKWIN”: 未声明的标识符        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        39
 错误        15        error C2065: “cbBackGroundWin”: 未声明的标识符        c:\users\zhijun.li.pecc\desktop\emwin软件仿真\sample\tutorial\basic_helloworld.c        39
 
 
 
 
 | 
 |