Friday, April 13, 2007

Compile error while using SHBrowseForFolder API in Borland C++ Builder

How annoying to see a perfectly good piece of code not compile!
That too for no fault of your own.

If you're using SHBrowseForFolder Shell API in a Borland C++ Builder project, you might run into the following problem:
Compile Error

To get around this all you need to do is define NO_WIN32_LEAN_AND_MEAN in the project settings like this:

Project Settings

Happy coding.