IIRC, it's suprisingly complicated to open the folder browsing dialog in WinAPI. It's like a 5 step process and you have to do all these weird allocations.
I honestly don't remember how to do it -- I only did it once like 5 years ago.
If you're using some other widget library like Qt or wx, etc... it's much easier.
Not certain if it answers the question, but I'm making a Windows Form Application.
I'm trying to get the user to pick a directory, and my program copy a file from that directory.
In form designer, right click on the button and select properties.
Towards the top of the Properties pane you should see an icon that looks like a bolt of lightning, click that.
In the list below find 'Click' and double click in the empty cell on the right.
This should generate and wire up the event handler for you.