AnsweredAssumed Answered

How to handle touch and drawing simultaneously ?

Question asked by kulkarni.amit.001 on Dec 1, 2015
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 ?







Attachments

Outcomes