The same principles apply to 32 bit applications. A 32 bit example is currently under development. There are some situations where you may wish for your application to be informed when another application is closing. This article will explore some methods for retrieving an application's main window handle and detecting when that application is closing. In order to find the main window for an application, you will need to know a few things about windows.
Every window belongs to a class.
Each window class describes a set of attributes that define a window's appearance and functionality. You can retrieve the window's class name by calling the GetClassName API function. In addition, most windows have an associated text string. You can call the GetWindowText API function to retrieve this text. The way this text is used will vary according to the window's class.