#include <stm32f10x_lib.h>
#include "sys.h"
#include "usart.h"
#include "delay.h"
#include "led.h"
#include "key.h"
#include "lcd92.h"
#include"GUI.h"
#include "WM_Intern_ConfDep.h"
//Mini STM32开发板范例代码10
//TFTLCD显示 实验
//正点原子@ALIENTEK
//技术论坛:www.openedv.com
#include"wm.h"
#include"button.h"
void WinHandler(WM_MESSAGE *pMsg){
switch(pMsg->MsgId){
case WM_PAINT:
GUI_SetBkColor(RED);
GUI_Clear();
delay_ms(10000);
GUI_DispStringAt("Hello world",0,0);
break;
}
}
int main(void)
{
WM_HWIN hWin2;
BUTTON_Handle hWin3;
Stm32_Clock_Init(9);//系统时钟设置
delay_init(72); //延时初始化
uart_init(72,9600); //串口1初始化
LED_Init();
LCD92_Init();
GUI_Init();
//LCD_L0_FillRect(30,90,100,150);
GUI_SetColor(GUI_RED);
LCD_Clear(WHITE);
//GUI_DispStringAt("linyutong",50,100);
GUI_DrawCircle(100,100,50);
hWin2=WM_CreateWindow(0,0,200,200,WM_CF_SHOW,&WinHandler,0);
delay_ms(1000);
WM_DeleteWindow(hWin2);
hWin3=BUTTON_Create(70,100,120,150,GUI_ID_OK,WM_CF_SHOW);
delay_ms(1000);
BUTTON_Delete(hWin3);
delay_ms(1000);
}
各位大侠帮帮忙 |