Author: jimtabor Date: Fri Apr 18 15:43:25 2008 New Revision: 33026
URL: http://svn.reactos.org/svn/reactos?rev=33026&view=rev Log: Implement NtGdiGetDCforBitmap. Q. Where to set hdc? ATM we return null.
Modified: trunk/reactos/subsystems/win32/win32k/include/bitmaps.h trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c trunk/reactos/subsystems/win32/win32k/stubs/stubs.c
Modified: trunk/reactos/subsystems/win32/win32k/include/bitmaps.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/bitmaps.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/bitmaps.h [iso-8859-1] Fri Apr 18 15:43:25 2008 @@ -23,6 +23,7 @@ /* For device-independent bitmaps: */ DIBSECTION *dib; HPALETTE hDIBPalette; + HDC hDC; } BITMAPOBJ, *PBITMAPOBJ;
#define BITMAPOBJ_IS_APIBITMAP 0x1
Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Fri Apr 18 15:43:25 2008 @@ -87,7 +87,7 @@ DHPDEV PDev; // <- GDIDEVICE.hPDev DHPDEV for device. INT DC_Type; INT DC_Flags; - PVOID pPDev; // PGDIDEVICE + PVOID pPDev; // PGDIDEVICE aka PDEVOBJ PVOID hSem; // PERESOURCE FLONG flGraphics; FLONG flGraphics2;
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Fri Apr 18 15:43:25 2008 @@ -78,6 +78,7 @@ }
bmp->flFlags = BITMAPOBJ_IS_APIBITMAP; + bmp->hDC = NULL; // Fixme
if (NULL != pBits) { @@ -739,4 +740,21 @@ return Count; } } + +/* + * @implemented + */ +HDC +APIENTRY +NtGdiGetDCforBitmap( + IN HBITMAP hsurf) +{ + HDC hDC = NULL; + PBITMAPOBJ bmp = BITMAPOBJ_LockBitmap( hsurf ); + hDC = bmp->hDC; + BITMAPOBJ_UnlockBitmap( bmp ); + return hDC; +} + + /* EOF */
Modified: trunk/reactos/subsystems/win32/win32k/stubs/stubs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/stu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/stubs/stubs.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/stubs/stubs.c [iso-8859-1] Fri Apr 18 15:43:25 2008 @@ -2053,19 +2053,6 @@ /* * @unimplemented */ -HDC -APIENTRY -NtGdiGetDCforBitmap( - IN HBITMAP hsurf) -{ - UNIMPLEMENTED; - return NULL; -} - - - /* - * @unimplemented - */ BOOL APIENTRY NtGdiGetDeviceCapsAll (