[MSW] wxChoice/wxListBox - different client data handling
|Reported by:||ericj||Owned by:||vadz|
|Keywords:||wxChoice wxListBox clientdata||Cc:||rivdsl@…|
Retrieving the client data is handled slightly different between wxChoice and wxListBox. For wxListBox, the client data is silently returned without error checking. In wxChoice the return value is checked for error.
This becomes relevant when the user tries to store data that happens to be the same as the Windows error code, CB_ERR = -1. Retrieving this value will fail for wxChoice, but work for wxListBox.
The following patch unifies handling between the two controls and makes the error checking more robust by also checking the value of GetLastError().
Change History (10)
Changed 2 years ago by ericj
comment:3 Changed 6 months ago by RIVDSL
- Resolution fixed deleted
- Status changed from closed to reopened