Search Results

Search results 1-20 of 47.

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Hello, it is nothing wrong with your dialog. The WM_CREATE message is for simple windows. For dialog windows you should use the WM_INIT_DIALOG message instead of WM_CREATE. Just change it in your callback _cbLoading(). Also you should call any drawing functions from callbacks in WM_PAINT message. If you want to achieve the black background on your dialog then you can use a special function for this purpose WINDOW_SetBkColor(). C Source Code (14 lines) Once you set it in WM_INIT_DIALOG it will dr…

  • Hello, thanks for the code, Sven. I realized that the inner color should be the background color. Sometimes it needs not to paint over the backround contents behind the polygon like in my case. I'm working on custom widget "gauge meter" that may have only the contour with transparent background so meter contents behind it should be visible. In this case as far as I understand memory device is the best solution. Alex.

  • Solved with using memore device so far. C Source Code (35 lines)

  • traversing in emwin calendar

    LexaGb - - emWin related

    Post

    Hello, faced the same problem. But calendar in emWin doesn't have these options for fast navigation. If you want to implement a calendar like in Windows, then you need to do custom calendar using different emWin options (e. g. animation, memory devices). In my case I created an additional dialog window with some widgets: listwheel for changing months, spinbox for changing years, button for applying the changes and closing the dialog. This dialog appears on top of the calendar when clicking on th…

  • It seems that "undocumented" message with the code 0x240 is documented. In WM.h it is nothing less than WM_TOUCH!

  • Yes! Found it too ! But what if they change that undocumented code (0x240) in next releases... Why the collapse / expand of MENU widgets is not provided as API functions...

  • Hello, maybe it is just easier to make modal the keyboard window and after closing it pass the "modality" to the dialog window. C Source Code (125 lines)If you want to prevent user input only to opened submenu you must also prevent it to the other widgets (e. g. horizontal menu). It seems in this case you must catch PID-messages in corresponding callbacks (at least WM_TOUCH and WM_MOUSEOVER to prevent changing appearance of the menu items). Alex.

  • Hello to everyone, I'm working with the simulation (latest version 5.50) and I'd like to understand using GUI_AA_DrawPolyOutline()/GUI_AA_DrawPolyOutlineEx() functions. I want to draw a simple antialiased polygon with a frame filled with inner color. Here is the code: C Source Code (29 lines) The result is the polygon filled with the gray color instead of the red color. Using GUI_AA_DrawPolyOutlineEx() function ends up with the same result. forum.segger.com/index.php/Att…489d511fed65ffbd18681f7b…

  • Hello, 1. Not sure if there is a special function in emWin, at least from documented, therefore, I’m afraid, again I’m going to tell about saving a window handle before making it modal and then checking a handle of necessary window if it matches to saved handle . Maybe Sven would clarify it. 2. Maybe you are looking for WM_GetParent() function. Alex.

  • Hello, yes, I think it is the good way, but in case your LISTBOXes' default callbacks are changed by custom callbacks, also be sure to check these callbacks. Alex.

  • Hello, maybe something like this C Source Code (108 lines)In case you want just to focus on dropdown in closed state there you can do easier: if (focusedWindow == DROPDOWN_GetListbox(hDropdown)) focusedWindow = hDropdown; without using fw_is_listbox variable. Alex.

  • Hello, try this code. It is for 800x600 screen example. C Source Code (35 lines)Alex.

  • Hello, It depends what was meant by the words "to run the KNOB". So it may be different situations depending on your project configuration: 1. If a user should not control the KNOB and your project doesn't need the touch input at all then simply don't initialize the touch panel on the DISCO board. So your application can control the KNOB simply by using KNOB_SetPos() function. See emWin manual for detailed description. 2. If a user should not control the KNOB but your project needs the touch inp…

  • Also check the return values for GUI_MEMDEV_CreateFixed32() functions. If a return value is 0 then it may be not enough memory for memdevice. The DISCO has an onboard SDRAM memory, so you can assign emWin memory pool to SDRAM. Alex.

  • Hello, yes, memdev functions are compiled with STemWin lib file. Try to use functions GUI_MEMDEV_CreateFixed32() instead of GUI_MEMDEV_Create(). The color depth in DISCO's display driver may not match to 32 bpp. Alex.

  • Hello, Sven. Oh, I didn't notice alpha is really lost. Now it looks good ) Alex.

  • Hello, I did something similar but it was not a custom widget. It was based on KNOB widget. It is in case you have memory devices option in your emWin package and your hardware has enough memory. Something like this: C Source Code (79 lines)Alex.

  • Emwin image draw

    LexaGb - - emWin related

    Post

    Hello, yes, widgets are by nature windows themselves. So you can use size related functions WM_ResizeWindow() / WM_SetSize() / WM_SetXSize() / WM_SetYSize()... to resize an IMAGE widget. Alex.

  • create scrollbar for image

    LexaGb - - emWin related

    Post

    Hello, Yes, you can do without userdata getting a scrollbar value in WM_PAINT. In the previous example the scrollbar attached to the image as a child widget therefore its location is inside the image and takes up the image space. In order to avoid covering the image you can either increase XSize of the image by the scrollbar size or create the scrollbar as a sibling widget to the image not as a child also in GUIBuilder. I simply changed the code to do accordingly. Alex.

  • create scrollbar for image

    LexaGb - - emWin related

    Post

    Hello, for scrolling a bitmap I'd create that bitmap as an IMAGE widget, not just drawing it with GUI_DrawBitmap(). Then you can attach scrollbar to the IMAGE widget and set custom callback function to the widget for scrollbar handling. Try the code attached. There is a WINDOW widget with a child IMAGE widget and vertical scrollbar attached. And you need to recalculate scrolling coefficient according to your image and scrollbar configuration. Alex.