Is there a way to obtain the width and height (in pixels) of a DC?

If you take the following code for example:

Code:
HDC memDC = CreateCompatibleDC ( hDC );
HBITMAP memBM = CreateCompatibleBitmap ( hDC, nWidth, nHeight );
SelectObject ( memDC, memBM );
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?