It in this case it is clearly better to use symbolic names for all of the flags.
Code: Select all
class.style := CS_VREDRAW + CS_HREDRAW + CS_DBLCLKS + CS_OWNDC;
Why?
Because on many other places within HostWindows also symbolic names are used
instead of hard coded constants. So this is not about introducing a mixture of styles.
It is obvious that the symbolic names simply did not exist in WinApi or its predecessors when
this module has been written. Now it exists and it should be used. Then the comment can be removed.
This is an advantage. Why? Because a comment can easily be inconsistent with the code.
The CPC version does it in the right way, at least in the line that has been added.
- Josef