Using TAdvStringGrid GetCheckBoxState function with the bool state result in C++ on Builder XE6 gives incorrect results because the value of the bool returned is not 1 when true but greater than 1 and when compared with another bool that is true, fails. This however, may be considered a compiler bug. Builder XE6 apparently expects bools to be either 1 or 0.
Return value of GetCheckBoxState indicates if the cell contains a checkbox or not (TRUE = contains checkbox) The actual state of the checkbox is returned via the VAR parameter state.
Yes that is understood. The VAR parameter state is the one with problems.
The component itself is written in Delphi, as such, the event handler signature is defined in Delphi and uses a Delphi boolean and I have always known these to match C++ bools.
Try doing it yourself and then look at the state result in the debugger as (int)rstate and let me know what you get.
state is a bool and is supposed to be used as bool.
Works as expected here on XE6 but also other C++Builder versions.
Thank you. You are right. I see it is more complicated to reproduce. Let me try on my end.