I've just read an MSDN article about storing bitmap to a file!!!
This is it.
I changed CreateBitmapInfoStruct function
and added some parameters to it.
BitsPerPixel, Width and Height of the picture.
Then I added some changes to code associated with new parameters. And also this
.bmiHeader.biPlanes = 1.

Everything works well, but when I set BPP parameter to the value of 8 (or less), then the black picture file is created. But Windows Explorer shows picrure's parameters properly.

Please tell me what is the problem?