SetWindowLong(...) returns LONG. You just interpret it differently. What makes the most sense is of course up to you. Do you even need the result and what are you doing with it?
It seems that in case 1 you search for a window handle that you already have in case 2. So case 2 would be more efficient.
I was studying how to make two text boxes (one normal) and one subclassed, have different background colors. The normal Edit control would be blue and the subclassed Edit control would be red. I wanted to make certain that I am subclassing correctly first. You have helped me past this part.