EmWin 2-Day Accelerated Instance Tutorial 003_framewin and window widgets and 2D drawings

Source: Internet
Author: User
Tags bmp image

Note: (1) Open the "Exe\guisimulationdebug.exe" under the project catalog to see the effect. (2) After reading the tutorial 000~005 will basically use Emwin to do the project, other chapters can be consulted when necessary.

(1) Each interface of Emwin requires a Framewin/window window control as a parent form, as if Framewin/window is a form frame, where all controls are placed in the frame, forming a relationship between the parent form and the child controls. The child control can be found through the parent form, or its parent form can be found through the child control, and the Framewin and window are visually distinct:



(2) The window widget is relatively simple to use, like a background, and there is no concept of the client area, which highlights how the Framewin window control is used:

The green portion of the Framewin window control is the client area, which is the customer area, and the following is a description of the Emwin instructions for Framewin and its client area:
The frame window actually consists of 2 windows;the main window and a child window. The child window is called Client window. ITIS important to being aware of this if dealing with callback Functions:thereare 2 windows with 2 different callback Func tions. When creating child Windows,these child windows was typically created as children of the client Window;their parent is the Refor the client window.
The Framewin window control actually contains 2 windows: the main window and the Subwindow, the child window called the client window, it is important to understand the concept of the main window and the client window when handling the callback function: Two windows can correspond to two different callback functions; When creating controls such as keystrokes, edit boxes, These controls are contained in the client window as child controls of the client window, so the parent window of these controls is the client window and not the main window.

(3) Background image display, using the BmpCvt.exe tool (in the tool directory) to convert the BMP image into a C file, and then add this C file to the Emwin project, and in the Wm_paint window redraw message with the Gui_drawbitmap () function to display the picture:
If it is the STM32 platform, where is the picture data stored? How to read image data? Storage data can be considered Nand-flash, Spi-flash, Nor-flash and so on ..., as to how to read the picture data, this is the Emwin driver thing, here we just say how to do the Emwin interface application only.




SOURCE/software Download

EmWin 2-Day Accelerated Instance Tutorial 003_framewin and window widgets and 2D drawings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.