Running a function at the end of WHEEL_MoveToPosEx(...)

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Running a function at the end of WHEEL_MoveToPosEx(...)

      Hi,

      I have a WHEEL implementation and I want to run a function at the end of WHEEL_MoveToPosEx(...) function.
      Currently, I call WHEEL_MoveToPosEx(...) with a Period of 100 ms.

      I am sure that WHEEL_MoveToPosEx(...) runs an animation under the hood.

      Is there a way to hook my custom function at the end of WHEEL_MoveToPosEx(...) to run my custom function?

      To give some context, I currently have an input screen in my GUI application with 5 vertical wheel side-by-side. I want to dynamically show and hide different wheels at a particular position depending on the position of other wheel. For example, showing number of days in a month depending on what month is selected in the month wheel. There are currently 4 wheels (digits 1 to 28,29,30 and 31) at the same position and I want to hide and show the wheels dynamically using WM_HideWin and WM_ShowWin functions.

      Thanks
    • Hi Sarthak,

      Yes, WHEEL_MoveToPosEx() runs an animation but there is no interface to hook in custom code into this animation.

      My guess is, you want to create a GUI for selecting a date, and based on the month, you want to show a different amount of days?

      I think it would be more elegant to just maintain one wheel for the number of days and dynamically switch out the content list, based on the current month (i.e. based on the amount of required days).

      You can just react on the WM_NOTIFICATION_VALUE_CHANGED notification that is sent by the WHEEL to know when a different month/day has been selected.

      I hope this helps.

      Best regards,
      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.