Create winAPI

Is it possible for C to create WindowsAPI or is it possible also for C++ not visual but Turbo C++?

if it possible what header should I need?

can you write a source to creating simple windows API interface only? and tell me in C or C++ language?
LVL 1
lewis_looAsked:
Who is Participating?
 
jhanceConnect With a Mentor Commented:
You asked:

>Is it possible for C to create WindowsAPI or is it
>possible also for C++ not visual but Turbo C++?

Yes, it IS possible to create Windows API programs in C as well as C++.  It is also possible to Turbo C++ to create Windows API programs.

>if it possible what header should I need?

As I said before, you will certainly need WINDOWS.H.  Other headers may be needed depending on what you are doing.

>can you write a source to creating simple windows
>APIinterface only? and tell me in C or C++ language?

Yes I can, the question is can you?  Here is about as simple a Windows API program that I can come up with:

#include "Windows.h"

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
      MessageBox(NULL, "Hello There", "Hello", MB_OK);
      return 0;
}
0
 
TriskelionCommented:
I can't believe this is only worth 10 points.
0
 
KangaRooCommented:
There is a windoze API, you don't need to create one. Get the Petzold book.
0
 
jhanceCommented:
You can write Windows API programs in either C or C++.  Turbo C++ can product Windows API programs (16-bit only).  If you get Borland C++ V5.0 or later, you can also do 32-bit Windows programs.  In virtually all cases, you need to:

#include <WINDOWS.H>


0
 
lewis_looAuthor Commented:
Where is the source?
0
All Courses

From novice to tech pro — start learning today.