Sunday, February 25th 2018, 6:07pm UTC+1

You are not logged in.

  • Login
  • Register

Search results

Search results 1-20 of 45.

Thursday, January 11th 2018, 12:26pm

Author: kenmux

How to Make Window Transparent Again?

Hello, Here's the scenario. There's a window created by WM_CreateWindowAsChild(). It's transparent when not focused, but turn to white focused. To make it clear, please refer to the images below: 1) The window is transparent for not focused (RIGHT!) [attach]2229[/attach] 2) The window turns to white for focused (RIGHT!) [attach]2230[/attach] 3) The window SHOULD turn to transparent again for not focused (WRONG!) [attach]2231[/attach] The question is, how to achieve this? To ask all the windows b...

Monday, January 8th 2018, 3:17pm

Author: kenmux

Question about restarting GUI in multi-task system

Hello Sven, Thanks for your reply! I checked carefully with the code, and did some modifications: 1) In the main UI task, calling GUI_Exec() before calling GUI_Exit(): C/C++ Source code 1 2 3 4 5 6 7 8 9 10 11 // Exit task EXIT : GUI_Exec(); GUI_X_Exit(); GUI_Exit(); vTaskDelay(10); GUI_Init(); WM_SelectWindow(WM_GetDesktopWindowEx(0)); GUI_DrawBitmap(UI_ImageTable[IMG_SPLASH_1_INDEX], 0, 0); GUI_Delay(500); UI_NotifyFTTask(TASK_EVENT_MISC_RETURN_TO_FT); vTaskDelete(NULL); 2) To make sure all re...

Friday, January 5th 2018, 2:56pm

Author: kenmux

How to make sure an image is removed from screen?

Thanks for your reply! I add GUI_Delay(5), then it seems okay now.

Friday, January 5th 2018, 2:38pm

Author: kenmux

Question about restarting GUI in multi-task system

Hello, In my project, there's a requirement for restarting GUI. My debugging code as follows: 1) In the main UI task: C/C++ Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 // Exit task EXIT : #if (GUI_X_SINGLE_TASK == 0) GUI_X_Task_Delete(); //Delete background GUI task #endif GUI_Exit(); vTaskDelay(10); GUI_Init(); WM_SelectWindow(WM_GetDesktopWindowEx(0)); GUI_DrawBitmap(UI_ImageTable[IMG_SPLASH_1_INDEX], 0, 0); GUI_Delay(500); UI_NotifyFTTask(TASK_EVENT_MISC_RETURN_TO_FT); //Ask test UI task to con...

Monday, December 11th 2017, 9:21am

Author: kenmux

How to make sure an image is removed from screen?

Hello all, I wrote some code as follows: C/C++ Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 static void _cbImageShtr(WM_MESSAGE * pMsg) { /* Local variable(s) */ WM_HWIN hWin; uint8_t UserData[20]; uint8_t * pData; int Index; int NumItems; int Period; size_t Offset; /* Handle the message(s) needed */ switch (pMsg->MsgId) { case WM_TIMER: hWin = pMsg->hWin; if (IMAGE_GetUserData(hWin, UserData, sizeof(UserDa...

Thursday, December 7th 2017, 10:47am

Author: kenmux

Message cannot be posted from child to parent via default callback?

Thanks for your reply, Sven Okay, I see. This is not the same as handling a key message, right? A key message will be posted to the focused window. If it is not handled by the focused window, it will be posted to its parent.

Thursday, December 7th 2017, 7:51am

Author: kenmux

Message cannot be posted from child to parent via default callback?

Hello all, In my opinion, the message will be posted from child to parent via default callback. Is it right? To make it clear, I wrote the test code as followed: C/C++ Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 static TEXT_Handle _hText; static WM_HWIN _hDialog; static void _cbText(WM_MESSAGE * pMsg) { /* Handle the message(s) needed */ switch (pMsg->MsgId) { case 1100: printf("TXT::1100\n"); break; //no return here ... let pare...

Tuesday, December 5th 2017, 9:49am

Author: kenmux

Bitmap file with custom "bfOffBits" cannot be displayed correctly

Hello, I have a bitmap file with custom "bfOffBits" (=56). It can be displayed very well in PC, but incorrectly in emWin: [attach]2148[/attach] The issued image is attached: [attach]2149[/attach] My emWin version is: v5.44 Then how should I do? It seems that emWin does not use the custom offset?

Thursday, August 10th 2017, 9:16am

Author: kenmux

Is it possible to generate EMF file from emWin?

Hello Sven, So, there's no acceptable way to create EMF file from emWin. Sigh~ Thanks for your reply any way! Kenmux

Thursday, August 10th 2017, 3:53am

Author: kenmux

Is it possible to generate EMF file from emWin?

Hello all, There's a requirement for generating EMF file from emWin. So I've read the chapter about movie, but with no idea about the possible way. IS IT POSSIBLE TO GENERATE EMF FILE FROM EMWIN? Or, Is there any way to generate jpeg file from the screen? I need a clear answer, thanks in advance! Kenmux

Tuesday, August 8th 2017, 7:46am

Author: kenmux

UI not refreshing while callback called

Hello, Now days, I encountered an annoying issue: The UI stopped refreshing while the callback was called all the time. I use a separate task calling GUI_Exec() once per 1ms, under FreeRTOS. My emWin version is v5.42. PS: If I add GUI_Exec() in the callback, this issue seems gone. (But, it's not recommended by the manual (Chapter 17.4.5), right?) So, what's wrong? Any ideas? Please help! Thanks in advance! Kenmux

Thursday, June 22nd 2017, 4:51am

Author: kenmux

Multitask and WM_LOCK()/WM_UNLOCK()

Hello Sven, Thanks for your reply. Your info is useful, but there's something else. Consider in this scenario under multitask system: Two widgets use the same callback. Then how to protect it? Any mechanism to make sure only one use it at the same time? Use GUI_X_Lock()/GUI_X_Unlock()? Any recommendations? Thanks, Kenmux

Wednesday, June 21st 2017, 9:44am

Author: kenmux

Multitask and WM_LOCK()/WM_UNLOCK()

Hello, Recent day I was struggling in handling with multitasks calling emWin. It seems that sometimes I need to use the pair of WM_LOCK()/WM_UNLOCK(). But not very sure. The manual does not mention it in details. In my multitask system (FreeRTOS), I follow the recommendations (chapter 17.4.5) strictly: - All UI requests are organized as events - One task handling with UI events as UI foreground task - One task calling GUI_Exec() as UI background task - Other real time tasks sending UI events to ...

Wednesday, June 21st 2017, 9:06am

Author: kenmux

Does emWin support YUV or not?

Hello Sven, I...see... Thanks for your reply! That means I need to convert YUV to RGB while preparing the image data. Thanks, Kenmux

Tuesday, June 20th 2017, 5:37am

Author: kenmux

Does emWin support YUV or not?

Hello, I want to draw an image with the format of YUV422. I read the manual carefully and see nothing about it. So, Does emWin support YUV or not? Thanks, Kenmux

Saturday, June 17th 2017, 8:34am

Author: kenmux

LISTBOX_GetItemText() in LISTBOX user draw function cause crashed

Hello Sven, Thanks for your reply. Yes I do that in the header file "GUI_ConfDefaults.h". And the library file re-created works very well now. I hope there's no potential risk, please!!! Thanks, Kenmux

Friday, June 16th 2017, 5:33am

Author: kenmux

LISTBOX_GetItemText() in LISTBOX user draw function cause crashed

Okay, a further step: 1) GUI__MEMCPY links to memcpy which causes crash 2) there's an optional replacement for memcpy which test good: GUI__memcpy So, can I replace memcpy with GUI__memcpy globally? Any potential risks? Similarly, GUI__memset vs memset? Also, the reason why memcpy caused crash unknown. Who can give some clear answers, thanks in advance. Kenmux

Thursday, June 15th 2017, 10:57am

Author: kenmux

LISTBOX_GetItemText() in LISTBOX user draw function cause crashed

Well, I took place the library file with source codes and looked into this issue. But, it still seems not that easy to find the problem. I focused on the function LISTBOX_GetItemText() and the code crashed on this line: C/C++ Source code 1 GUI__MEMCPY(pBuffer, pString, CopyLen); But it seems that all local variables are sane: [attach]1746[/attach] Then where goes wrong? Just confused... Any ideas? Thanks, Kenmux

Thursday, June 15th 2017, 6:32am

Author: kenmux

LISTBOX_GetItemText() in LISTBOX user draw function cause crashed

Okay, I did another test, in the callback of LISTBOX, calling LISTBOX_GetItemText() also cause crashed, reason unknown. Who can shed me some light of hope? Thanks in advance! Kenmux