I have a button class deriving from CommonButtonBase, and for some reason this “else if” conditional statement is considering the variable “bButtonEnabled” as false when it is true.
In this conditional statement, UseStyle should get set to NormalStyle, then the “else” statement should be skipped over (so long as bButtonEnabled is true) right?
Well the debugger tells me that bButtonEnabled is 1 (meaning it should be read as true)
You’re not debugging in release mode by any chance? In release mode, the compiler can optimize which style to choose from and just use one of the statements for the assignment.