Is there a way to obtain the width and height (in pixels) of a DC?
If you take the following code for example:
How can I obtain the width and height of hDC so that I can pass the proper values for nWidth and nHeight so that the created bitmap is exactly the same size as the hDC surface?Code:HDC memDC = CreateCompatibleDC ( hDC ); HBITMAP memBM = CreateCompatibleBitmap ( hDC, nWidth, nHeight ); SelectObject ( memDC, memBM );




Reply With Quote