Windows Programming is very much different from the C programming.To begin Windows API you should have an appropriate compiler.To develop software that utilizes the Windows API, a compiler must be able to handle and import the Microsoft-specific DLLs and COM-objects. The compiler must either handle the header files that expose the interior API function names, or supply such files by itself. For certain classes of applications, the compiler system should also be able to handle IDL (interface definition language) files. Collectively, these prerequisites (compilers, tools, libraries, and headers) are known as the Microsoft Platform SDK. For a long time, the Microsoft Visual Studio family of compilers and tools and Borland's compilers were the only tools that could provide this (although at least in the case of Windows, the SDK itself is downloadable for free separately from the entire IDE suite, from Microsoft Platform SDK Update). Nowadays, the MinGW and Cygwin projects also provide such an environment based on the GNU Compiler Collection, using a stand-alone header file collection to make linking against Microsoft DLLs possible. LCC-Win32 is a "free for non-commercial use" C compiler maintained by Jacob Navia. Pelles C is another freeware C compiler maintained by Pelle Orinius. Free Pascal is a free software Object Pascal compiler capable of writing software based on the Windows API. MASM32 is a mature project by Microsoft to provide support for the Windows API under MASM-syntax x86 assembly by using custom made or converted headers and libraries from the Platform SDK.
Simple Windows Program
Let's start windows programming.Here we are assuming that you are familier with c programming language.
If you dont know how to program in c then it's not the right place for starting windows programming using c.
Another assumption made by us is that your using Visual C++ 2008 with Visual Studio 2008.Programming using another compilers will be discussed later.
Let's code our first windows program.If your new to Visual Studio then following Video will help you to start new project in Visual C++ 2008
#include<windows.h>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
{
MessageBox(NULL,"Hello WIN32 API!","HELLO MSG",0);
return 0;
}
If you have any problem in running the program plz see the following video.
As you see Window API program is different from the regular c program. Windows have its own datatypes for windows programming.
Simple Windows Program
Let's start windows programming.Here we are assuming that you are familier with c programming language.
If you dont know how to program in c then it's not the right place for starting windows programming using c.
Another assumption made by us is that your using Visual C++ 2008 with Visual Studio 2008.Programming using another compilers will be discussed later.
Let's code our first windows program.If your new to Visual Studio then following Video will help you to start new project in Visual C++ 2008
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
{
MessageBox(NULL,"Hello WIN32 API!","HELLO MSG",0);
return 0;
}
If you have any problem in running the program plz see the following video.
As you see Window API program is different from the regular c program. Windows have its own datatypes for windows programming.