Calling Api's from VC++

Hi Experts...

Well: Just traying to learn C++
In my VC++, in an Exe project (Not talking about MFC EXE project).
i tried this... just to do some experiments...
I tried to call the well known Api DragAcceptFiles
DragAcceptFiles(hWnd,true);
The strange thing is that when you write "DragAcceptFiles(" The little
yellow box appears as it was a declared function....
But when I try to build the project the compiler reject my code telling:

"DragAcceptFiles Undeclared idetifier"

What do I have to do to be able to call Windows Api from my program?.
In the same code generated by the Wizzard... appears some calls as to be
"ShowWindow", "DestroyWindow", "DialogBox", "UpdateWindow", "RegisterClasEx"...
Well... They seem to be Api Calls, and they work fine.

Thanks.
LVL 1
MarscAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
You'll have to

#include <shellapi.h>

to get this working. This API isn't declared in 'windows.h' but in the above header.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MarscAuthor Commented:
Thank you very much...
It worked.
Now... By the way... I know there are another library... May be there are several header files to include for calling apis...
Do you know the names :)
Thanks again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.