STEmWin with Touch Screen on STM32F746G Dicovery – Part 3

This is third part of the series. If you have not finished part 1 and part 2, you need to, if you want to continue with this one.

STEmWin is very big and for beginner as I am very hard to undrstand. So in this tutorial I will only show hot to display simple button widgets and in next tutorial I will show you how I draw buttons myself using “low level” of STEmWin.

Each widget needs to be defined simmilar as variables. We do this at the beginning of main function:

Then we can use it inside main:

First 3 lines are to define our button and then the GUI_Exec(); function redraws our display.

This was simplest example. Below is a screenshot of just a little more complex example using Buttons and JPEG background:

For this example we will need three files buttons.c, buttons.h and BrushedMetal.h.

We need to copy booth .h files inside inc folder in root of our project and copy .c file inside src folder in root of our project.

Inside main function we need to include .h files:

and change user code inside USER CODE 2 to:

In case you would like to use these three files for your project you have my permission to do so, I would only like to see the project done with it.

This is as much as my knowledge goes using STEmWin widgets. I might update this tutorial sometimes in the future if I learn more. In next tutorial I will show how I draw buttons using just functions for drawing simple object.

Thank you for visiting! Here is link to part 4 of tutorial.

Leave a Reply

Your email address will not be published. Required fields are marked *