WM_HideWindow not hiding

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

    • WM_HideWindow not hiding

      Hi guys,

      I'm working with IAR and STemWin to create an ui for an application of us, builded for an ST32F429-Discovery board.
      I've noticed a strange behaviour hiding/showing a widget, more specifically a button. Below my code:

      Source Code

      1. typedef enum {
      2. navigation_button_Previous = 0,
      3. navigation_button_Next,
      4. navigation_button_Max
      5. } typ_Navigation_Button_ids;
      6. void CP_UI_Window_show_Navigation_Button(
      7. //! Button identifier
      8. typ_Navigation_Button_ids btn_id,
      9. //! Show/Hide
      10. bool show
      11. )
      12. {
      13. if( btn_id == navigation_button_Previous )
      14. {
      15. if( show )
      16. {
      17. WM_ShowWindow( h_button_Navigation_Previous );
      18. }
      19. else
      20. {
      21. WM_HideWindow( h_button_Navigation_Previous );
      22. }
      23. }
      24. else
      25. {
      26. if( show )
      27. {
      28. WM_ShowWindow( h_button_Navigation_Next );
      29. }
      30. else
      31. {
      32. WM_HideWindow( h_button_Navigation_Next );
      33. }
      34. }
      35. // Apply changes
      36. GUI_Exec();
      37. }
      Display All

      This function is called every time the very first or very last widget of a "list" is reached, hiding the previous and next button respectively.
      The strange thing is that after this "sequence" of actions, shown->hidden->shown, I'm not able to hide the button one more time. Debugging, the program reaches the right call and it seems to run the WM_*() function, but nothing changes.

      Hope anyone can help me,
      Many thanks

      Andrea