I've just begun to learn C++. I'm going along fine in the book but I'd like to try something in the registry.

From VB I usually use an API in the fashion:

RegCreateKey(stuff)
RegSetValueEx(stuff)
RegCloseKey(stuff)

But I've been pulling hairs out trying to get that to work in C++.

I've seen many bits and pieces about how to work with the registry but haven't seen a complete example. If someone could post any example that actually writes anything to the registry I'd love to see it. And if I could just cut and paste it into my program it would be great and then if it works I can compare it to what I've done and see what's up.

I'll tell you it's so frustrating to try to do something in C++ that I can do in VB in about 3 seconds. But I'm going to stick with it and see what comes of it. Because I used to be in love with Access and then started using VB and thought it was hard as well. But then I got more and more comfortable with it and all worked out great.