Saturday, September 23rd 2017, 12:28am UTC+2

You are not logged in.

  • Login
  • Register

Search results

Search results 1-15 of 15.

Thursday, September 14th 2017, 11:21pm

Author: RodolfoDias

Issues with GUI_EndDialog and WM_DELETE

I am using the following structure on my dialogs. But after some tests in debugging the code, I've noticed that the WM_DELETE doesn't appear to execute right after a GUI_EndDialog. It appears that emWin only marks the dialog to be deleted in a near future. When is the best moment to clear the dialog internal data in order to be sure that all data is ready to be used the next time the dialog is opened? Even when the dialog is deleted and created in a very short interval. I am worried about re-ope...

Wednesday, May 24th 2017, 8:27pm

Author: RodolfoDias

At startup LCD display shows half the screen completely white.

Rarely right after the startup my LCD display shows half the screen completely white, the other half shows the software without problems. The main problem here is that to see this problem I have to initialize my hardware a lot of times, I don't have the exactly figures but maybe once every one hundred initializations. Once the display is initialized with the problem the software and the touchscreen work as expected. But I see a pattern that maybe can help me to understand what goes on when the p...

Wednesday, May 17th 2017, 4:41pm

Author: RodolfoDias

Handling FAT32 partitions with emFile

Hi, is it possible to handle more than one FAT32 partition in a single SD using emFile? My intent is to store data in different areas of the card. My FS_X_AddDevices looks like this: C/C++ Source code 1 2 3 4 5 6 7 8 9 10 void FS_X_AddDevices(void) { FS_AssignMemory(&_aMemBlock[0], sizeof(_aMemBlock)); FS_AddDevice(&FS_MMC_CardMode_Driver); FS_MMC_CM_Allow4bitMode(0, 1); FS_MMC_CM_AllowHighSpeedMode(0, 0); FS_ConfigUpdateDirOnWrite(0); FS_AddDevice(&USBH_MSD_FS_Driver); }

Monday, May 8th 2017, 7:36pm

Author: RodolfoDias

Further information

I have tried to implement the desired behaviour through the WM_TOUCH event. But I have noticed that this event is only received when the touch occurs inside the window. I am still missing the event that allow me to receive a touch performed outside the window.

Monday, May 8th 2017, 3:03pm

Author: RodolfoDias

How to detect a click outside a window

Hi, in my project I am using some windows as popups. They are half the area of the background window and are displayed centered in the screen. My problem is, I wanna close this popup when the user touches the screen outside the popup area, but I don't know how to detect this event. The best approach in my opinion is close the popup in its own callback, as it can be opened from any window it will be a bad design if I need to insert code in all windows that can be its background. Any advice in how...

Wednesday, May 3rd 2017, 9:52pm

Author: RodolfoDias

More information about Adrian's advice

Hi, I am facing the same problem described in this thread and I would appreciate more information about how to implement the 'faking' effect. After overwritting the paint function how can I change the color of the widgets? C/C++ Source code 1 2 3 4 5 6 7 8 9 10 case WM_PAINT: { // Default painting. WM_DefaultProc(pMsg); // Custom painting. // What now? } break;

Wednesday, April 26th 2017, 10:09pm

Author: RodolfoDias

Found it!!!

I have found the solution thinking about how to implement a timer in a FrameWin. I submitted a question about it some weeks ago, the link is here. It appears that some functions must be implemented using another callback, according to the following squeme: 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 45 46 47 48 49 50 51 52 53 static void cbFrameWin(WM_MESSAGE * pMsg) { // ... switch (pMsg->MsgId) { c...

Wednesday, April 26th 2017, 8:53pm

Author: RodolfoDias

Further debug information

I have debugged the code and noticed that my frame window is not receiving a WM_NOTIFY_PARENT. I thought that maybe the notification does not happen because my widget is custom and is being created outside the GUI_WIDGET_CREATE_INFO, so I used the WM_AttachWindow to attach it to the winframe. Unfortunatelly, the problem still persists.

Tuesday, April 25th 2017, 8:14pm

Author: RodolfoDias

Custom widget is not notifying its FrameWin parent

Hi, I have some custom widgets in my project and I have noticed that when they are added to a FrameWin they do not notify its parent as expected. The framewin is created like this: C/C++ Source code 1 2 3 4 5 6 7 8 static const GUI_WIDGET_CREATE_INFO widget_info[] = { { FRAMEWIN_CreateIndirect, NULL, WDG_FRAMEWIN, 0, 0, 400, 235, 0 }, // Custom Widget - Manifold Id { TEXT_CreateIndirect, NULL, WDG_TXT_PRODUCT, 20, 75, 100, 50, 0, 0, 0 }, // Custom Widget - Product { BUTTON_CreateIndirect, NULL, ...

Thursday, April 6th 2017, 9:53pm

Author: RodolfoDias

How to detect a WM_DisableWindow in a custom widget.

I have a lot of custom widgets in my project. All of them created with WM_CreateWindowAsChild and returning a handle to the main window. Something like this: 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 SPIN_TEXT_BOX_HD SPIN_TEXT_BOX_create(int x, int y, int w, int h, WM_HWIN hWinParent, U32 style) { SPIN_TEXT_BOX_HD mainHd; WM_HWIN widgetHd; spin_text_box_t dft_data = {0, 0, 0, {NULL} }; btn_data_t btn_data = {0, FALSE}; // Edit dimension...

Thursday, April 6th 2017, 9:16pm

Author: RodolfoDias

How to use Timers in Framewin?

It has worked perfectly. It is even possible to add multiple timeouts. 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 45 46 47 48 49 50 /********************************************************************* * * _cbFrameWin */ static void _cbFrameWin(WM_MESSAGE * pMsg) { switch (pMsg->MsgId) { case WM_TIMER: timer_id = WM_GetTimerId(pMsg->Data.v); if(timer_id == TIMER_ID_INIT) { // TIMER_ID_INIT executes...

Thursday, March 30th 2017, 9:48pm

Author: RodolfoDias

How to draw a filled gradient circle

What is the best way to draw a filled gradient circle. I am currently using bmp images, but I wonder whether it would be possible to use simple emWin operations. I have not found any information regarding my question in the documentation. But I imagine that maybe using transparent windows and the drawing of gradient rectangles it is possible to achieve the same result. So, Is it possible to draw a filled gradient via simple drawing operations or the best way is the use of an image? Thanks.

Thursday, March 30th 2017, 4:59pm

Author: RodolfoDias

How to improve image drawing performance.

Hi, I have a window in my project that draws several images on the screen to be used as buttons. My problem is, I've noticed that every time this window is draw the performance decreases, it is possible to notice that the process takes too long. The question is. Is there a way to improve the drawing process of images? I already load my images in memory before calling the method GUI_BMP_DrawUsing the same software version, I've removed the GUI_BMP_DRAW, with everything else unchanged, to run a te...

Monday, March 6th 2017, 1:10pm

Author: RodolfoDias

It looks indeed that the timer doen't work on framewin

Strange that the thread is so old without a resolution, because I notice the same problem working in my project. This is the code where I've found the issue. If I use framewin instead of Window the timers work. 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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 9...