You're accessing the Wnd directly as if it was another unrelated object type. When you do that you only have access to the public interface. You can only access the protected interface through a Combobox object, which is why the other operator= that takes a Combobox works fine.

I think the only solution might be to either get rid of that operator= (why would you want that anyway?), expose the m_hWnd publicly somehow (probably a bad idea) or make Combobox a friend.

You're accessing the Wnd directly as if it was another unrelated object type. When you do that you only have access to the public interface. You can only access the protected interface through a Combobox object, which is why the other operator= that takes a Combobox works fine.

I think the only solution might be to either get rid of that operator= (why would you want that anyway?), expose the m_hWnd publicly somehow (probably a bad idea) or make Combobox a friend.

Hello and thank you for the reply.
I was just going to post that I solved my problem.