cleanup C++ code for wclass and ide projects
use C++ bool values false/true instead of TRUE/FALSE macros
correct some variables type
add parentheses for better readability