cancel
Showing results for 
Search instead for 
Did you mean: 

STemwin: activate touch button with extern button

ma.g-gross9
Associate II
Posted on April 28, 2016 at 13:06

Hey community,

I am using StemWin 5.28 on the STM32f429 DISC1 board.

I created a Windows with the GUIBuilder. This windows contains a button with the text ''start''. If I press the button something should happen. This is not the problem. If I press the button the function I implemented runs.

But now I want to activate this button with an extern button to. I connected an extern button to an I/O-Pin. Reading the button is no problem. Is the button is pressed, the MCU recognize this. If I press the extern the button, the window should get the message that this button is pressed. But I have no idea how I should implement that. The documentation of emWin is not helpfull for me.

Maybe someone can help me please?

Thanks :)
3 REPLIES 3
ma.g-gross9
Associate II
Posted on April 28, 2016 at 14:49

Okay I managed the problem.

I analysed the message which is send, when the button is released and build a similar one for the physical button.

But now I have another problem. The physical buttons and the touch screen are controlled by a independent timer and an ISR. If a physical touch was detected a Message box appears in which the user has to press OK. But the timer for the touch screen doesn't trigger anymore. What can I do so that the timer trigger anyway?

Thanks :)

ma.g-gross9
Associate II
Posted on May 09, 2016 at 14:36

Hello,

i have to reactivate this thread again. I have still a problem with the command WM_SendMessage.

The structure needs a hWinSrc but I dont know which value a I have to give this. I managed the problem by observing the message while debugging. So I build a similar message and it works. In my case I have to give hWinSrc the value 50.

But now I reorganized the window by some new buttons. The old ones still exists. Now my message doesn't work anymore. Can I give hWinSrc a name as variable or something like this?

Thanks :)