In order to explain message passing in detail we'll discuss the button click. Like any other control, it belongs to some top-level window, whose procedure is called when a button click event is raised as a response to the mouse button press.
The following example will demonstrate the basic usage of message handling, responsible for the mouse move and button-click.
Now, let's create our program and explain its structure. Perform the following steps:
Create a new empty C++ Win32 project application named
basic_MPI
.Open Solution Explorer and right-click on Source file. Add the new source file named
basic_MPI
. Openbasic_MPI.cpp
and add the following code to it:#include <windows.h> #include <windowsx.h> #include <tchar.h> #include <commctrl.h> #pragma comment ( lib, "comctl32.lib" ) #pragma comment ( linker, "\"/manifestdependency:type='win32' \ name='Microsoft...