Win32 Programming Tutorials

Purely Win32 Windows API tutorials, Articles and Examples using C Programming.
  Title / Author Replies
Views Reverse Sort Order
I needed to check the OS and on different OS the different path needed to be followed and so the host operating system version was needed for an application I was developing. Background First I would like to make a table where we know what are the platformId, MajorVersion, MinorVersion of...
5
29,928
Introduction This code is a simple example to show the creation of various tab controls. The code //HEADER FILES # include <windows.h>
25
15,279
Introduction Socket is an interface between an application process and transport layer. The application process can send or receive messages to/from another application process (local or Network) through a socket. Winsock is the lowest level Windows API for TCP/IP programming. Part of the code...
3
14,770
Consider a simple EXE COM server, FooServer. Let's assume FooServer exposes an object Foo that has a method Bar: IFoo = interface procedure Bar; end; Let's also assume that FooServer has no clue what multithreading is and is therefore single-threaded just like any normal application....
3
13,748
Introduction Windows communicate with the application by sending messages. There are many Windows messages and each message is represented by a unique integer value.In WINDOWS.H there are standard names for these messages. There are some common Windows messages like:-...
7
13,342
The sample project using MFC is intended to either shutdown, logoff, or restart the computer at a given time or immediately. This is a Visual C++ Project using the concept of Win32 APIs with MFC. The Shutdown Timer application also uses System Tray Interface to handle it with menu options. API...
23
12,922
Its always a good practice to have the resource into a seperate DLL. The major benefit of having the resource into seperate dll is, it can be easily skinned. Also it has the benefit of seperating the GUI from the code which is better for maintainance. Here are the simple steps to do the same. ...
17
12,499
Socket ( Definition ): Socket is End to End Point Communication. Establishing a Connection Between two Applications or processes or threads. Creating interface between two programs ( Server and Client Programs ). Socket is very useful for communication between systems, that's called inter...
6
10,158
Hello Guys, Back again with new Article. this time I am going to explain Enumeration of Windows service, it’s Starting & Stopping , Changing Startup Type between Automatic, Manual And Disable, And Most Important One Deleting the Service(Please handle this Option With Care, if this action is...
4
10,142
Introduction This article shows the enumeration of child windows. The code is written in win 32 and can be understood with a prior knowledge of it. Although i have tried well to explain all the points as far as possible. //HEADER FILES # include <windows.h>
13
8,743
Introduction Here I shall describe the methods of how data is exchanged between windows of different processes. Communication between windows means one window process send/post a message/data to the other window process. The Windows operating system provides the mechanism for communications and...
2
8,642
Introduction Subclassing is a very powerful tool in creating your own custom controls and modifying the standard windows interface. This is typically done by replacing the Window Procedure for a window with application-defined window procedure. Subclassing is a technique that allows an...
2
8,142
The purpose of this tutorial is to give you an idea on how to create a COM Server using ATL, and then being able to call the server from both a Visual C++ program, and a Visual Basic program. I am not gonna go into the depths of COM details or burden you down with IDL, this tuorial is designed to...
1
8,097
There are many occasions where we need to show to the user the list of available printers on the system to choose from and this can be done very easily in MFC with the help of following code snippet DWORD dwNeeded = 0, dwItems = 0; LPBYTE lpPrinterInfo = NULL; CStringArray szaPrinterArray;...
1
7,742
When a new process is created, the "subsystem" field in the executable file header determines whether it was linked as a console (also called CUI or "character-based") or graphical user interface (GUI) application. A console application has a character-mode console window, which it inherits from...
1
7,581
Introduction There a quite a few ways to start a process C run-time libraries system() _exec() _spawn() Win32 API
2
6,982
Introduction This article is about how static or implicit linking can be done and how the client program gets the information from Dynamic link library (DLL). The two ways we can link a DLL to the client program. One is “Static linking” another is “Dynamic linking”. Here our topic is static...
7
6,963
There are 2 ways to make your Application Single Instance. 1. Close the previously running executable 2. Close the new instance with passing necessary info from the older version. First option is not preferred because you may have lots of information already accumulated in the running...
1
6,503
Introduction This article will explain how we can explicitly link a DLL and why this approach is better than the implicit linking mechanism of a DLL. Explicit linking is more appropriate for interpreted languages such as Visual Basic, but we can use it from C++. In this linking mechanism we...
2
6,306
Before reading this article you may know what is Microsoft foundation classes and Visual C++.I am listing here few of its features. When MFC was introduced, Microsoft extended the C++ syntax with a series of macros for management of Windows messages, exceptions, run time type identification, and...
1
6,183