It works because CBrush and CPen are derived from class CGdiObject, which has an operator void* that is being called when you leave out the & symbol. So the & symbol in this case is optional.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Offline 21,966 posts
since Aug 2005