I have implemented the following function to show an eror message line
at the bottom of the screen and expected, that after the function
GUI_MEMDEV_CopyToLCD(hMem);
my old content of the display appears again. But this does not work.
I see still the error message line on my screen.
void ShowErrorMessageLine(int ErrorCode, int Time, char *pErrorString)
{
GUI_RECT rect={0, LCD_LINES-LCD_SIZE_SOFTKEYBAR, LCD_COLUMS-1, LCD_LINES-1};
GUI_MEMDEV_Handle hMem;
PushGrafikSettings();
hMem = GUI_MEMDEV_CreateFixed32(rect.x0, rect.y0, LCD_COLUMS, LCD_SIZE_SOFTKEYBAR);
GUI_MEMDEV_CopyFromLCD(hMem);
GUI_SetBkColor(GUI_RED);
GUI_SetColor(GUI_WHITE);
GUI_SetFont(pFontMenuText);
GUI_ClearRect(rect.x0,rect.y0,rect.x1,rect.y1);
if (ErrorCode)
GUI_DispStringInRectWrap(GetTextVonSprache(ErrorCode),&rect,GUI_TA_VCENTER|GUI_TA_HCENTER,GUI_WRAPMODE_WORD);
else
GUI_DispStringInRectWrap(pErrorString,&rect,GUI_TA_VCENTER|GUI_TA_HCENTER,GUI_WRAPMODE_WORD);
GUI_Exec();
GUI_Delay(Time);
GUI_MEMDEV_CopyToLCD(hMem);
GUI_MEMDEV_Delete(hMem);
PopGrafikSettings();
}
Has anybody an idea, what the problem can be?
Many thanks in forward
Andreas
at the bottom of the screen and expected, that after the function
GUI_MEMDEV_CopyToLCD(hMem);
my old content of the display appears again. But this does not work.
I see still the error message line on my screen.
void ShowErrorMessageLine(int ErrorCode, int Time, char *pErrorString)
{
GUI_RECT rect={0, LCD_LINES-LCD_SIZE_SOFTKEYBAR, LCD_COLUMS-1, LCD_LINES-1};
GUI_MEMDEV_Handle hMem;
PushGrafikSettings();
hMem = GUI_MEMDEV_CreateFixed32(rect.x0, rect.y0, LCD_COLUMS, LCD_SIZE_SOFTKEYBAR);
GUI_MEMDEV_CopyFromLCD(hMem);
GUI_SetBkColor(GUI_RED);
GUI_SetColor(GUI_WHITE);
GUI_SetFont(pFontMenuText);
GUI_ClearRect(rect.x0,rect.y0,rect.x1,rect.y1);
if (ErrorCode)
GUI_DispStringInRectWrap(GetTextVonSprache(ErrorCode),&rect,GUI_TA_VCENTER|GUI_TA_HCENTER,GUI_WRAPMODE_WORD);
else
GUI_DispStringInRectWrap(pErrorString,&rect,GUI_TA_VCENTER|GUI_TA_HCENTER,GUI_WRAPMODE_WORD);
GUI_Exec();
GUI_Delay(Time);
GUI_MEMDEV_CopyToLCD(hMem);
GUI_MEMDEV_Delete(hMem);
PopGrafikSettings();
}
Has anybody an idea, what the problem can be?
Many thanks in forward
Andreas