Yes, I found this in MSDN under "Synchronization Objects":
In some circumstances, you can also use a file, named pipe, or communications device as a synchronization object; however, their use for this purpose is discouraged. Instead, use asynchronous I/O and wait on the event object set in the OVERLAPPED structure. It is safer to use the event object because of the confusion that can occur when multiple simultaneous overlapped operations are performed on the same file, named pipe, or communications device. In this situation, there is no way to know which operation caused the object's state to be signaled.
I need to modify a 16 color bmp and then save it as a seperate file. I loaded a 16 color 48x48 bmp file on DC using the LoadImage() and BitBlt() API. Using GDI functions, I change the display on the DC, say draw a line on the DC, on top of the image displayed. Now I need to capture the current DC ( bmp image + the changes,i.e., the line) and create a new BMP file.
For 256 color and 16 color BMP file, the new BMP created is a plain white imgage, if I load the image with 'LR_CREATEDIBSECTION' flag in LoadImage API. else I get am able to create the file, but the image size is different. For the 24 bpp the application is working fine. Where am i doing wrong. I am using the 'CreateCompatibleBitmap()' to create the bitmap from DC. Is there any other way?.