AnsweredAssumed Answered

STemWin Swipelist exception

Question asked by ra hummel on May 15, 2017
Latest reply on Nov 22, 2017 by Imen D


I'm using STM32CubeF4 1.14.0 with STemWin 5.32 and have setup a simulation of the GUI in Visual Studio where I link the STemWin532_WIN32.lib into the project.


I have found a severe problem with the SWIPELIST widget which throws an exception in the simulation each time when you populate the list and after that delete the swipelist or a the last item in the list like:


  WM_HWIN hSwipe = SWIPELIST_CreateEx(400, 290, 200, 120, hWin, WM_CF_HIDE, 0,
  SWIPELIST_AddItem(hSwipe,"Item 0",100);

This throws an unhandled exception in the simulation. I checked the behaviour against the up to date simulation library from Segger (5.40) and found that the behaviour cannot be reproduced there. Also the code on the embedded target does not show that behaviour.


How can this be fixed? Unfortunately the new STM32CubeF4 (1.16) still has the old STemWin 5.32.


Additionally I found that the description of return value from SWIPELIST_AddItem in the manual is not correct. Instead to return 1 when an item has been added successfully it returns 0 on success and 1 on failure.