diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 4215a7eda93..dd39fa26dd7 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -1952,7 +1952,7 @@ static int may_use_dibsection(HDC hdc) { return TRUE; if (bitspixel<=4) return FALSE; - return GetDeviceCaps(hdc,94) & 0x10; + return GetDeviceCaps(hdc,CAPS1) & C1_DIBENGINE; } #endif diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index 245d0830b79..1ff355f478e 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c @@ -348,7 +348,7 @@ HIC VFWAPI ICGetDisplayFormat( HDC hdc; hdc = GetDC(0); - depth = GetDeviceCaps(hdc,12)*GetDeviceCaps(hdc,14); + depth = GetDeviceCaps(hdc,BITSPIXEL)*GetDeviceCaps(hdc,PLANES); ReleaseDC(0,hdc); if (depth==15) depth = 16; if (depth<8) depth = 8; diff --git a/include/wingdi.h b/include/wingdi.h index da63e629cf4..d6f7db94736 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -1509,6 +1509,7 @@ typedef struct tagEXTLOGPEN #define ASPECTXY 44 #define LOGPIXELSX 88 #define LOGPIXELSY 90 +#define CAPS1 94 #define SIZEPALETTE 104 #define NUMRESERVED 106 #define COLORRES 108 @@ -1612,6 +1613,22 @@ typedef struct tagEXTLOGPEN #define RC_OP_DX_OUTPUT 0x4000 #define RC_DEVBITS 0x8000 +/* CAPS1 */ + +#define C1_TRANSPARENT 0x0001 +#define TC_TT_ABLE 0x0002 +#define C1_TT_CR_ANY 0x0004 +#define C1_EMF_COMPLIANT 0x0008 +#define C1_DIBENGINE 0x0010 +#define C1_GAMMA_RAMP 0x0040 +#define C1_REINIT_ABLE 0x0080 +#define C1_GLYPH_INDEX 0x0100 +#define C1_BIT_PACKED 0x0200 +#define C1_BYTE_PACKED 0x0400 +#define C1_COLORCURSOR 0x0800 +#define C1_CMYK_ABLE 0x1000 +#define C1_SLOW_CARD 0x2000 + /* Device-independent bitmaps */ typedef struct { diff --git a/objects/dc.c b/objects/dc.c index 1f0ab34ab48..c2ebfd18e48 100644 --- a/objects/dc.c +++ b/objects/dc.c @@ -820,6 +820,19 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap ) case SCALINGFACTORY: if(Escape(hdc, GETSCALINGFACTOR, 0, NULL, (LPVOID)&pt) > 0) ret = pt.y; break; + case CAPS1: + FIXME("(%04x,%d): DeviceCaps param CAPS1 is UNIMPLEMENTED, will yield 0!\n", + hdc,cap ); + + /* please see wingdi.h for the possible bit-flag values that need + to be returned. + + also, see + http://msdn.microsoft.com/library/ddkdoc/win95ddk/graphcnt_1m0p.htm + + the fall-through to 'default' is on purpose */ + + default: if ((cap < 0) || (cap > sizeof(DeviceCaps)-sizeof(WORD))) break;