@gentleguy the rule you mention holds for pretend Booleans like the WinSDK BOOL type, which is typedef of int, and hence can store more than just TRUE (1) and FALSE (0). It does not hold for the bool type.
Both are correct. The advantage gained by explicitly referring to if(z == true) rather than if(z) is there is little or no opportunity for ambiguity or errors to creep in, especially in maintaining the software later on.
Maintainable, self-documenting and above all readable code is far more important than writing 'shorthand' stuff.
And giving 'z' a more meaningful name isn't a bad move.