Элементы управления Windows
Перевод А. И. Легалова
Англоязычный оригинал находится на сервере компании Reliable Software
Элементы управления Windows
Перевод А. И. Легалова
Англоязычный оригинал находится на сервере компании Reliable Software
Разделительная полоска (сплиттер)
Перевод А. И. Легалова
Англоязычный оригинал находится на сервере компании Reliable Software
Окно диалога
Перевод А. И. Легалова
Англоязычный оригинал находится на сервере компании Reliable Software
Использование потоков
Перевод А. И. Легалова
Англоязычный оригинал находится на сервере компании Reliable Software
Рационализация OLE
Перевод А. И. Легалова
Англоязычный оригинал находится на сервере компании Reliable Software
In this tutorial we'll learn how to load bitmaps from resources and from files, how to pass them around and blit them to the screen. We'll also see how to create and use an empty bitmap as a canvas, draw a picture on it and then blit it to the screen. Finally, we'll combine these techniques to write a simple program that uses double-buffering and timer messages to show a simple animation involving sprites.
First of all, in most cases Windows provides storage for bitmaps and takes care of the formatting of bits. The programmer gets access to the bitmap through a handle, whose type is HBITMAP. (Remember to set the STRICT flag when compiling Windows programs, to make sure HBITMAP is a distinct type, rather than just a pointer to void.)
Since a bitmap is a resource (in the Resource Management sense), the first step is to encapsulate it in a “strong pointer” type of interface. Notice the transfer semantics of the constructor and the overloaded assignment operator, characteristic of a resource that can have only one owner at a time.
Программа с диалогом в качестве главного окна
Перевод А. И. Легалова
Англоязычный оригинал находится на сервере компании Reliable Software