Dear emWin-users,
once again I would like to ask you for some help.
Let's ignore the issues, caused by lack of allocated memory, hardware problems etc. My question only refers to the way I use Memory Device (to display a .gif on the LCD) with Window Manager (some buttons here). So I have 3 main steps:
1: Let`s call this function _DemoMemDev:
static void _DemoMemDev(void) {
GUI_MEMDEV_Handle hMem;
//
// Create the memory device
//
hMem = GUI_MEMDEV_Create(0,0,800,480);
// // Activate it //
GUI_MEMDEV_Select(hMem);
//
// Drawing operations to the memory device
//
GUI_GIF_DrawEx(APP_GetData, &fil8, 0, 0); // (APP_GetData and fil8 defined, everything works fine ( from an external SD-card))
//
// Routes the drawing operations to the LCD
//
GUI_MEMDEV_CopyToLCDAt(hMem,0,0);
2: Lets call this function _cbMenuDialog:
I will suppress it a little bit, no big deal here:
static void _cbMenuDialog(WM_MESSAGE * pMsg) {
......
case WM_PAINT:
break;
case WM_INIT_DIALOG:
break;...... default: WM_DefaultProc(pMsg); break;
}
3. Last function CreateMenuWindow:
void CreateMenuWindow(void) {
WM_HWIN welcome_menu_screen;
welcome_menu_screen = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbMenuDialog, WM_HBKWIN, 0, 0); //_aDialogCreate with WINDOW_CreateIndirect & some BUTTON_CreateIndirect...
}
I need your advice how to order the function and where to call them respectively? The .gif file should be redrawn only once, and not every time (like in WM_PAINT). But the buttons on the screen should remain and change after pressing on them etc. Can you help me with this ?
Many thanks
Ivo
once again I would like to ask you for some help.
Let's ignore the issues, caused by lack of allocated memory, hardware problems etc. My question only refers to the way I use Memory Device (to display a .gif on the LCD) with Window Manager (some buttons here). So I have 3 main steps:
1: Let`s call this function _DemoMemDev:
static void _DemoMemDev(void) {
GUI_MEMDEV_Handle hMem;
//
// Create the memory device
//
hMem = GUI_MEMDEV_Create(0,0,800,480);
// // Activate it //
GUI_MEMDEV_Select(hMem);
//
// Drawing operations to the memory device
//
GUI_GIF_DrawEx(APP_GetData, &fil8, 0, 0); // (APP_GetData and fil8 defined, everything works fine ( from an external SD-card))
//
// Routes the drawing operations to the LCD
//
GUI_MEMDEV_CopyToLCDAt(hMem,0,0);
2: Lets call this function _cbMenuDialog:
I will suppress it a little bit, no big deal here:
static void _cbMenuDialog(WM_MESSAGE * pMsg) {
......
case WM_PAINT:
break;
case WM_INIT_DIALOG:
break;...... default: WM_DefaultProc(pMsg); break;
}
3. Last function CreateMenuWindow:
void CreateMenuWindow(void) {
WM_HWIN welcome_menu_screen;
welcome_menu_screen = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbMenuDialog, WM_HBKWIN, 0, 0); //_aDialogCreate with WINDOW_CreateIndirect & some BUTTON_CreateIndirect...
}
I need your advice how to order the function and where to call them respectively? The .gif file should be redrawn only once, and not every time (like in WM_PAINT). But the buttons on the screen should remain and change after pressing on them etc. Can you help me with this ?
Many thanks
Ivo