The tutorial is garbage.
Besides, I would recommend you get a C++ GUI framework such as Qt instead of doing pure Win32 programming. It's easier and it's faster.
Some advice:
- Don't use new when you don't need to. If you can away with not doing it, then do that. In this case, it's pointless.
- Stay away from C functions. They are Evil™. wsprintf can cause buffer overflows. Learn to use stringstreams instead. You can get a C-style string from std::string by calling .c_str(). This allows you to pass it to certain APIs that require C-style strings.