Is it possible to capture (or wait for) a Key Event/Slider Event inside a while loop?
I have created a Window that can play a sound. The window is composed of:
1. Button - (starts the playing of sound when pressed)
2. Slider - (changes the volume level when moved)
When I pressed the Button, it starts playing the sound. The playing of sound is implemented in a while loop.
====================================
code snippet:
BUTTON PRESSED EVENT:
while
{
PlaySound()
}
====================================
Inside the while loop, I would like to add a handle that can process the WM_NOTIFICATION_VALUE_CHANGED event whenever I moved the Slider, so that the volume level can be changed.
Code snippet will be something like this:
while
{
HandleSliderEvent(); //change the volume level
PlaySound()
}
How do I implement this in EMWIN? Is there any EMWIN API I can use to wait for certain key events inside a while loop?
Regards,
Den
I have created a Window that can play a sound. The window is composed of:
1. Button - (starts the playing of sound when pressed)
2. Slider - (changes the volume level when moved)
When I pressed the Button, it starts playing the sound. The playing of sound is implemented in a while loop.
====================================
code snippet:
BUTTON PRESSED EVENT:
while
{
PlaySound()
}
====================================
Inside the while loop, I would like to add a handle that can process the WM_NOTIFICATION_VALUE_CHANGED event whenever I moved the Slider, so that the volume level can be changed.
Code snippet will be something like this:
while
{
HandleSliderEvent(); //change the volume level
PlaySound()
}
How do I implement this in EMWIN? Is there any EMWIN API I can use to wait for certain key events inside a while loop?
Regards,
Den
The post was edited 2 times, last by dgajudo ().