bool guess=PDC - & gt; TransparentBlt (
0, 0
, m_ClientRect. Width ()
, m_ClientRect. Height ()
, & amp; M_gridDC
, 0, 0
, m_ClientRect. Width ()
, m_ClientRect. Height ()
, RGB (255, 255, 255));
DWORD x=GetLastError ();//reflection for parameter error
Operation result error code of 87, said parameter errors, but I don't know is which parameter error?
CodePudding user response:
Code of PDC is equipment DC pointer, m_gridDC is a memory DC, rectangular m_ClientRect is equipmentCodePudding user response:
BOOL TransparentBlt (
Int xDest,
Int yDest,
Int nDestWidth,
Int nDestHeight,
The CDC * pSrcDC,
Int xSrc,
Int ySrc,
Int nSrcWidth,
Int nSrcHeight,
UINT clrTransparent);
DC parameters are interpreted as in the MSDN: equipment in the rectangular coordinates, equipment DC rectangle width, memory DC Pointers, memory DC rectangular coordinates, the memory DC rectangular aspect, needs to be transparent RGB
CodePudding user response:
By the way, in the m_gridDC common BMP bitmap is not, but there is a custom mapping mode of the bitmapCodePudding user response:
Equipment DC should agree with m_gridDC mapping mode,CodePudding user response: