Monday, December 11th 2017, 5:52pm UTC+1

You are not logged in.

  • Login
  • Register

Search results

Search results 1-20 of 440.

Today, 11:19am

Author: SEGGER - Schoenen

WM_SetCallback problem?

Hi, attached is an example which shows several ways to update the MULTIEDIT widget. Regards Sven

Today, 10:46am

Author: SEGGER - Schoenen

EDIT Widget show incorrect Cursor position with Unicode strings

Hi, I was able to reproduce the behavior, but unfortunately this a limitation in regards of using a shift JIS font. We wil add this to our to do list but we can not say if or when we will add this to emWin. If you are not bound to a S-JIS font you can get around of this if you use a non-shift-JIS font. Regards Sven

Friday, December 8th 2017, 3:25pm

Author: SEGGER - Schoenen

WM_SetCallback problem?

Hi, AS the name of WM_PAINT suggests, this message is send if a window/widget/dialog should be drawn. Please do not call any other functions than those related to drawing. Setting properties (like MULTIEDIT_AddText()) or (in the worst case) creating windows or widgets within WM_PAINT can lead to unexpected behavior. For example, if you are within WM_PAINT and set a text for a transparent widget, it gets invalidated. A transparent widget causes the background to be redrawn. If the text was set wi...

Thursday, December 7th 2017, 2:54pm

Author: SEGGER - Schoenen

CHECKBOX in SWIPELIST - how to check which one selected?

Hi, Take a look into the example attached. Within the callback of the swipelist I react on notifications send by the checkboxes to their parent (in this case the SWIPELIST). Regards Sven

Thursday, December 7th 2017, 10:21am

Author: SEGGER - Schoenen

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

Hi, Do I get you right that you expect that a message which is not handled by a child should be passed to its parent? but this is not the case. If you send a message to a specific window, only that single window will receive the message. If you want that the parent react on a non-handled message you have to manually pass it to the parent. 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 ...

Thursday, December 7th 2017, 10:09am

Author: SEGGER - Schoenen

How to use STM3210C-EVAL board with CubeMX generated code integrating (ST) emWin

Hi, You can use the project which comes with the stm32CubeF1 package. All you have to do is to set up the GUIDRV_FlexColor driver a bit different and call a initialization fitting to the ILI9341. To set up the driver you can use the attached LCDConf.c as a reference. It already uses the correct FelxColorFunc (GUIDRV_FLEXCOLOR_F66709). You have to set the function pointer for communication and choose the proper mode (e.g. GUIDRV_FLEXCOLOR_M16C1B8). EDIT: Forgot the attachement. Regards Sven

Thursday, December 7th 2017, 9:55am

Author: SEGGER - Schoenen

How to force window to invalidate itself such that it jumps to WM_PAINT?

Hi, I recommend to use WM_Invalidate(hWin) to mark windows as invalid. Next time a GUI_Exec() gets called (e.g. within GUI_Delay()) the invalid windows are getting drawn. But please do not call GUI_Exec right after a call WM_Invalidate() when inside a callback. The best way is to have a super loop which calls periodically GUI_Exec()/GUI_Delay(). These function are keeping the application 'alive'. Now if you want to redraw a window just mark it as invalid (WM_Invalidate()) and it gets redrawn wit...

Wednesday, December 6th 2017, 2:34pm

Author: SEGGER - Schoenen

passing parameters to a callback function

Hi, Unfortunately the is no direct way to pass data to a blocking dialog. To set user data it would be necessary to have the handle of the dialog. You could create your own create-blocking-dialog-function. Attached is an example how this could be done. After creating a dialog with GUI_CreateDialogBox() you can use the handle to set user data (don't forget to set the number of additional bytes in the create structure). After setting the user data you can call GUI_ExecCreatedDialog() which is bloc...

Wednesday, December 6th 2017, 10:16am

Author: SEGGER - Schoenen

How to get image pressed event if window has two images which are same size and same position ?

Hi, Yes you are right. The topmost widget image_2 catches the input and it never get through to image_1. Attached is your example with a small change which makes it working. You can either react on release of image_2 or react on both widgets in the 'same' case. Search for '/****/' to find my changes. I had a good laugh once it was working. Didn't expected such an image. Another point is that you set an empty BMP data. It is working but I don't recommend to do this. Better would be to set simply ...

Tuesday, December 5th 2017, 5:12pm

Author: SEGGER - Schoenen

Bitmap file with custom "bfOffBits" cannot be displayed correctly

Hi, You are right, the bfOffBits wasn't taken into account properly. This is fixed in version 5.44b of emWin. Please use your MyAccount login to get the latest emWin version. BTW: You got a valid license number with running support and update agreement. Please feel free to contact the emWin support directly. Regards Sven

Tuesday, December 5th 2017, 3:29pm

Author: SEGGER - Schoenen

Button SKIN - change button colour upon button press.

Hi, This depends pretty much on how want your buttons look like. If you just want the default style but with different colors you should use the functions BUTTON_GetSkinFlexProps() and BUTTON_SetSkinFlexProps(). Read the old properties and write back the new ones. Make sure to save the default ones if you want to reuse them. I don't really like the default look, so in most cases I overwrite the skinning routine or the callback and draw the button on my own. I do this either with standard drawing...

Tuesday, December 5th 2017, 2:53pm

Author: SEGGER - Schoenen

Alpha blending not work

Hi, It shouldn't matter which IAR version or even which toolchain you are using. Which color conversion are you using, GUICC_M8888I? Which device are you using? I did the test on a STM32F746 Discovery using a clean project for this evalboard from the STM32F7 Cube package. Regards Sven

Monday, December 4th 2017, 3:50pm

Author: SEGGER - Schoenen

Peripherals Stop Working during changing page on emwin.

Hi, How do you create the subpage? If it is a dialog, do not use GUI_ExecDialogBox() or GUI_ExecCreatedDialog(), since these functions are blocking and won't return until the dialog gets deleted. GUI_CreateDialogBox() should be used instead, which allows the application to continue. Regards Sven

Monday, December 4th 2017, 9:27am

Author: SEGGER - Schoenen

Alpha blending not work

Hi, I gave it a try with the 'Hello World' project offered by STM. I have changed the library to ARGB and set the define GUI_USE_ARGB to 1 (setting the define is quite important since it is used in some header files, too). Further I have moved the GUI memory into the external RAM at address 0xC0000000 to be able to allocate more memory (although, this is not required to run a Hello World application). Take care, at 0xC0200000 starts the framebuffer. After doing the steps above I tried the applic...

Tuesday, November 28th 2017, 11:18am

Author: SEGGER - Schoenen

Skinning EDIT widget?

Hi, Unfortunately, it is not possible to set a skinning routine for this widget. In this case you have to overwrite the callback function and draw the widget on your own. Regrards Sven

Tuesday, November 28th 2017, 11:06am

Author: SEGGER - Schoenen

SKINNING - font size change using the same skin?

Hi, You could use BUTTON_SetFont() to change the font. If you want to change the font e.g. when clicking the button you can react on WIDGET_ITEM_DRAW_TEXT within the custom skinning routine and change the font accordingly. Attached is an example where I change the font if the button gets pressed down and uses the default font when it gets released. Regards Sven

Tuesday, November 28th 2017, 10:23am

Author: SEGGER - Schoenen

SKINNING - ways to pass a value (text) to a skinning callback

Hi, There is no way to pass a string directly to a skinning routine. You can set a string to most widgets are receive this string by calling the GetText function of this widget. For example, set a string to a button with BUTTON_SetText() and receive it inside the skinning function with a call of BUTTON_GetText(). You can use the handle which is past to the skinning routine in the WIDGET_ITEM_DRAW_INFO structure, pDrawItemInfo->hWin. This is always the widget this skinning function belongs to. Re...

Monday, November 27th 2017, 5:08pm

Author: SEGGER - Schoenen

How to show dinamic variable

Hi, I have modified the example from my last post and added an EDIT widget. Within the super loop I use the handle of the EDIT widget to set a random value. In this example I use the function WM_GetDialogItem() with the handle of the parent dialog and the ID of the EDIT widget. It is also possible to store the handle of the EDIT widget in a static variable when within WM_INIT_DIALOG. Regards Sven

Thursday, November 23rd 2017, 4:45pm

Author: SEGGER - Schoenen

MESSAGE does not disapper after clicking OK

Hi, If the default background is behind the message box, it is most likely that it disappeared but the background doesn't 'know' how to redraw and the old drawing (the message box) is still present. Please try this code: 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 #include "DIALOG.h" /********************************************************************* * * _cbBk */ static void _cbBk(WM_MESSAGE * pMsg) { switch (pMsg->MsgId) { case WM_PAINT:...