GetSafeHwnd()

CreateCompatibleBitmap

The CreateCompatibleBitmap function creates a bitmap compatible with the device that is associated with the specified device context.  该函数创建与指定的设备环境相关的设备兼容的位图。

HBITMAP CreateCompatibleBitmap(
  HDC hdc,        // handle to DC   
  int nWidth,     // width of bitmap, in pixels
  int nHeight     // height of bitmap, in pixels
);
 

Parameters

hdc
[in] Handle to a device context.
nWidth
[in] Specifies the bitmap width, in pixels.
nHeight
[in] Specifies the bitmap height, in pixels. 
原文地址:https://www.cnblogs.com/qiwu1314/p/8376138.html