初级会员
- 积分
- 63
- 金钱
- 63
- 注册时间
- 2016-10-28
- 在线时间
- 13 小时
|
2金钱
我调用了这些函数包括GUI_DrawLine()和GUI_DrawRect()等一些GUI函数,LCD都不能显示出来,只显示GUIbuilder生成的界面。
而且调用GUI_Init();函数还会产生黑屏(无论放在何处),求解?
GUI_Init();
GUI_SetTextMode(GUI_TEXTMODE_TRANS);
GUI_SetFont(GUI_FONT_24_ASCII);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt("WIDGET_EditWinmode", 160, 5);
部分代码如下:
**********************************************************************
*/
// USER START (Optionally insert additional static code)
// USER END
/*********************************************************************
*
* _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg) {
WM_HWIN hItem;
int NCode;
int Id;
static char BUTTON_4_Color = 0;
static char BUTTON_5_Color = 0;
static char BUTTON_6_Color = 0;
static char BUTTON_7_Color = 0;
static char BUTTON_8_Color = 0;
static char BUTTON_9_Color = 0;
static char BUTTON_10_Color = 0;
static char BUTTON_11_Color = 0;
static char BUTTON_12_Color = 0;
static char BUTTON_13_Color = 0;
GUI_Init();
GUI_SetTextMode(GUI_TEXTMODE_TRANS);
GUI_SetFont(GUI_FONT_24_ASCII);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt("WIDGET_EditWinmode", 160, 5);
// USER START (Optionally insert additional variables)
// USER END
switch (pMsg->MsgId) {
case WM_INIT_DIALOG:
//
// Initialization of 'Window'
//
hItem = pMsg->hWin;
WINDOW_SetBkColor(hItem, 0x0000FF00);
//
// Initialization of 'IO'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
BUTTON_SetFont(hItem, GUI_FONT_13B_ASCII);
BUTTON_SetBkColor(hItem, BUTTON_CI_UNPRESSED, GUI_BLACK);
BUTTON_SetTextColor(hItem, BUTTON_CI_UNPRESSED, GUI_WHITE);
|
|