diff --git a/include/gdi.h b/include/gdi.h index 2394837b..c8600eec 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -1389,6 +1389,20 @@ MG_EXPORT HDC GUIAPI CreateCompatibleDCEx (HDC hdc, int width, int height); */ MG_EXPORT BOOL GUIAPI IsCompatibleDC (HDC hdc1, HDC hdc2); +/** + * \fn BOOL GUIAPI IsMemDC (HDC hdc1) + * \brief Check whether a given DC is a memory DC. + * + * This function checks whether a give DC \a hdc is a memory DC. + * + * \param hdc The handle to the DC. + * + * \return TRUE for memory DC, otherwise FALSE. + * + * \sa CreateMemDCEx + */ +MG_EXPORT BOOL GUIAPI IsMemDC (HDC hdc); + /** * \fn HDC GUIAPI CreateMemDCEx (int width, int height, int depth, DWORD flags, \ Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask, diff --git a/src/newgdi/gdi.c b/src/newgdi/gdi.c index 5955c220..536c8319 100644 --- a/src/newgdi/gdi.c +++ b/src/newgdi/gdi.c @@ -3731,3 +3731,9 @@ MG_EXPORT BOOL GUIAPI SyncUpdateDC (HDC hdc) #endif } +MG_EXPORT BOOL GUIAPI IsMemDC (HDC hdc) +{ + PDC pdc = dc_HDC2PDC(hdc); + return dc_IsMemDC (pdc); +} +