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?
 
jkrConnect With a Mentor Commented:
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
 
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
All Courses

From novice to tech pro — start learning today.