I've been trying to understand how to draw something in a window. I have a STM32F746G-Disco board and started with the STemWin Hello World example. Currently I have used the GUIBuilder to create a Window and inside that window are some images. Which creates this:
Along with the associated callback function _cbDialog to initiate and "set" the images, which displays correctly.
I have also implemented touch and would like for some actions to happen when they are pressed, so I have added
in my switch case statement for the callback _cbDialog, similar to how a button works. This works for manipulating the images that already exists in the window (redrawing them, set to top, etc).
I now would like to draw a line, or display text. This is where it gets fuzzy for me. Looking at the manual and searches on the forum, it seems I should add the WM_PAINT case to the callback and call a draw function in there. So I try
but it does not get displayed.
I have looked at: Drawing over widgets , Paint text on top of all existing dialog windows , and Cannot execute line drawing functions in any other window other than the Desktop Window. . I have read through the manual and have not been able to find my answer.
When debugging, I see that it is getting to the WM_NOTIFICATION_CLICKED and WM_PAINT, so they are being reached.
Is there any examples that show how to properly implement this?
Thank you,
amorgan
Along with the associated callback function _cbDialog to initiate and "set" the images, which displays correctly.
I have also implemented touch and would like for some actions to happen when they are pressed, so I have added
in my switch case statement for the callback _cbDialog, similar to how a button works. This works for manipulating the images that already exists in the window (redrawing them, set to top, etc).
I now would like to draw a line, or display text. This is where it gets fuzzy for me. Looking at the manual and searches on the forum, it seems I should add the WM_PAINT case to the callback and call a draw function in there. So I try
but it does not get displayed.
I have looked at: Drawing over widgets , Paint text on top of all existing dialog windows , and Cannot execute line drawing functions in any other window other than the Desktop Window. . I have read through the manual and have not been able to find my answer.
When debugging, I see that it is getting to the WM_NOTIFICATION_CLICKED and WM_PAINT, so they are being reached.
Is there any examples that show how to properly implement this?
Thank you,
amorgan