ABSTRACT

This chapter introduces Application Program Interface (API) programming in Windows. At an initial level of Windows programming the use pre-canned interfaces may have some attraction, however, in high-performance graphics these packages are, at best, a nuisance and more often a major hindrance. All Windows graphical user interface (GUI) applications must have a WinMain() function. WinMain() is to a Windows GUI program what main() is to a DOS application. A window class is a general classification. Other data must be provided at the time the actual windows is created. The CreateWindowEx() function receives the additional information as parameters. CreateWindowEx() is a Windows 95 version of the CreateWindow() function. The WM_CREATE message is sent to an application as a result of the CreateWindowEx() function in WinMain(). This message gives the application a chance to perform preliminary initialization, such as displaying a greeting screen, or playing a sound file.