Thanks!! That was the answer I was looking for. So it seems passing objects without references is a much object-oriented and cleaner way of doing things. On the other hand, it's not very efficient.
Originally Posted by tabstop
In Java, function calls are passed by reference 1) to make things more efficient 2) elminate the confusion for the programmers.
Also yes I had a few typos. the myObj = new object_type would not have compiled. I meant to say this:
It just occured to me that when I declare it, a copy was made. At the WM_CREATE, I have the object constructed it again. Yes one would argue that poniters would make things more efficient but I have to keep track of the dcHandle. Anyhow I'll just use pointers and add a destructor.
object_type myObj; //global delcaration because I need to initialize it within the case statement in WM_CREATE.
object_type myObj= object_type(dcHandle);