cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle touch and drawing simultaneously ?

amit251291
Associate II
Posted on December 01, 2015 at 07:34

I have attached my controller code (Controller used is STM32F429ZI.. STM32F4 discovery board with EMWIN

).

CreateWindow() creates a window which has a button with the name ''Inital''. Child window is created with WM_CreateWindowAsChild() API. In ChildWinHandler, WM_PAINT is used. WM_PAINT actually calls DrawWaveform() function which in turn just draws a line point by point. (that's our requirement so can't use direct API to draw a line). For every 1ms touch status is checked using TM_EMWIN_UpdateTouch(); and TM_DELAY_1msHandler();

Issue: If we click on button while the above line is being drawn, line drawing hangs. But if we click on a button, after line drawing is completed,it works properly and button changes its text to ''Final''.. (this is correct behaviour).

How can i achieve this correct behaviour ?

#stm32 #touch #stemwin #button
0 REPLIES 0