winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
955 discussions
Start a n
N
ew thread
Hans Leidekker : winemenubuilder: Lower case the content type.
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: df260d14a6af2f9057883d11a0b4404860f28c46 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=df260d14a6af2f9057883d11a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri May 14 15:35:04 2010 +0200 winemenubuilder: Lower case the content type. --- programs/winemenubuilder/winemenubuilder.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 8f6e042..afa541a 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -2092,6 +2092,8 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package iconW = assoc_query(ASSOCSTR_DEFAULTICON, extensionW, NULL); contentTypeW = assoc_query(ASSOCSTR_CONTENTTYPE, extensionW, NULL); + if (contentTypeW) + strlwrW(contentTypeW); if (!freedesktop_mime_type_for_extension(nativeMimeTypes, extensionA, extensionW, &mimeTypeA)) goto end;
1
0
0
0
Hans Leidekker : winedump: Print the network share name in .lnk files.
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: f6612adcd29b99ae9488cb370c265d6384a7c3b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6612adcd29b99ae9488cb370…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri May 14 16:46:06 2010 +0200 winedump: Print the network share name in .lnk files. --- tools/winedump/lnk.c | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/tools/winedump/lnk.c b/tools/winedump/lnk.c index 98892c9..680e2de 100644 --- a/tools/winedump/lnk.c +++ b/tools/winedump/lnk.c @@ -118,6 +118,15 @@ typedef struct _LOCAL_VOLUME_INFO DWORD dwVolLabelOfs; } LOCAL_VOLUME_INFO; +typedef struct _NETWORK_VOLUME_INFO +{ + DWORD dwSize; + DWORD dwUnkown1; + DWORD dwShareNameOfs; + DWORD dwReserved; + DWORD dwUnknown2; +} NETWORK_VOLUME_INFO; + typedef struct { DWORD cbSize; @@ -232,9 +241,10 @@ static int dump_location(void) printf("Header size = %d\n", loc->dwHeaderSize); printf("Flags = %08x\n", loc->dwFlags); - /* dump out information about the volume the link points to */ - printf("Volume ofs = %08x ", loc->dwVolTableOfs); - if (loc->dwVolTableOfs && (loc->dwVolTableOfs<loc->dwTotalSize)) + /* dump information about the local volume the link points to */ + printf("Local volume ofs = %08x ", loc->dwVolTableOfs); + if (loc->dwVolTableOfs && + loc->dwVolTableOfs + sizeof(LOCAL_VOLUME_INFO) < loc->dwTotalSize) { const LOCAL_VOLUME_INFO *vol = (const LOCAL_VOLUME_INFO *)&p[loc->dwVolTableOfs]; @@ -245,6 +255,19 @@ static int dump_location(void) } printf("\n"); + /* dump information about the network volume the link points to */ + printf("Network volume ofs = %08x ", loc->dwNetworkVolTableOfs); + if (loc->dwNetworkVolTableOfs && + loc->dwNetworkVolTableOfs + sizeof(NETWORK_VOLUME_INFO) < loc->dwTotalSize) + { + const NETWORK_VOLUME_INFO *vol = (const NETWORK_VOLUME_INFO *)&p[loc->dwNetworkVolTableOfs]; + + printf("size %d name %d ", vol->dwSize, vol->dwShareNameOfs); + if(vol->dwShareNameOfs) + printf("(\"%s\")", &p[loc->dwNetworkVolTableOfs + vol->dwShareNameOfs]); + } + printf("\n"); + /* dump out the path the link points to */ printf("LocalPath ofs = %08x ", loc->dwLocalPathOfs); if( loc->dwLocalPathOfs && (loc->dwLocalPathOfs < loc->dwTotalSize) )
1
0
0
0
Roderick Colenbrander : opengl32: Add 32-bit bitmap rendering test.
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: 3a5ddab91db427626a7b98c0d5743fd3f7cd75be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a5ddab91db427626a7b98c0d…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Fri May 14 12:56:44 2010 +0200 opengl32: Add 32-bit bitmap rendering test. --- dlls/opengl32/tests/opengl.c | 87 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 87 insertions(+), 0 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index ab55e0b..7568f47 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -22,6 +22,10 @@ #include <wingdi.h> #include "wine/test.h" +void WINAPI glClearColor(float red, float green, float blue, float alpha); +void WINAPI glClear(unsigned int mask); +void WINAPI glFinish(void); +#define GL_COLOR_BUFFER_BIT 0x00004000 const unsigned char * WINAPI glGetString(unsigned int); #define GL_VENDOR 0x1F00 #define GL_RENDERER 0x1F01 @@ -499,6 +503,88 @@ static void test_acceleration(HDC hdc) } } +static void test_bitmap_rendering(void) +{ + PIXELFORMATDESCRIPTOR pfd; + int i, iPixelFormat=0; + unsigned int nFormats; + HGLRC hglrc; + BITMAPINFO biDst; + HBITMAP bmpDst, oldDst; + HDC hdcDst, hdcScreen; + UINT32 *dstBuffer; + + memset(&biDst, 0, sizeof(BITMAPINFO)); + biDst.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + biDst.bmiHeader.biWidth = 2; + biDst.bmiHeader.biHeight = -2; + biDst.bmiHeader.biPlanes = 1; + biDst.bmiHeader.biBitCount = 32; + biDst.bmiHeader.biCompression = BI_RGB; + + hdcScreen = CreateCompatibleDC(0); + if(GetDeviceCaps(hdcScreen, BITSPIXEL) != 32) + { + DeleteDC(hdcScreen); + trace("Skipping bitmap rendering test\n"); + return; + } + + hdcDst = CreateCompatibleDC(hdcScreen); + bmpDst = CreateDIBSection(hdcDst, &biDst, DIB_RGB_COLORS, (void**)&dstBuffer, NULL, 0); + oldDst = SelectObject(hdcDst, bmpDst); + + /* Pick a pixel format by hand because ChoosePixelFormat is unreliable */ + nFormats = DescribePixelFormat(hdcDst, 0, 0, NULL); + for(i=1; i<=nFormats; i++) + { + memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR)); + DescribePixelFormat(hdcDst, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd); + + if((pfd.dwFlags & PFD_DRAW_TO_BITMAP) && + (pfd.dwFlags & PFD_SUPPORT_OPENGL) && + (pfd.cColorBits == 32) && + (pfd.cAlphaBits == 8) ) + { + iPixelFormat = i; + break; + } + } + + if(!iPixelFormat) + { + skip("Unable to find a suitable pixel format"); + } + else + { + SetPixelFormat(hdcDst, iPixelFormat, &pfd); + hglrc = wglCreateContext(hdcDst); + todo_wine ok(hglrc != NULL, "Unable to create a context\n"); + + if(hglrc) + { + wglMakeCurrent(hdcDst, hglrc); + + /* Note this is RGBA but we read ARGB back */ + glClearColor((float)0x22/0xff, (float)0x33/0xff, (float)0x44/0xff, (float)0x11/0xff); + glClear(GL_COLOR_BUFFER_BIT); + glFinish(); + + /* Note apparently the alpha channel is not supported by the software renderer (bitmap only works using software) */ + ok(dstBuffer[0] == 0x223344, "Expected color=0x223344, received color=%x\n", dstBuffer[0]); + + wglMakeCurrent(NULL, NULL); + wglDeleteContext(hglrc); + } + } + + SelectObject(hdcDst, oldDst); + DeleteObject(bmpDst); + DeleteDC(hdcDst); + + DeleteDC(hdcScreen); +} + struct wgl_thread_param { HANDLE test_finished; @@ -833,6 +919,7 @@ START_TEST(opengl) res = SetPixelFormat(hdc, iPixelFormat, &pfd); ok(res, "SetPixelformat failed: %x\n", GetLastError()); + test_bitmap_rendering(); test_minimized(); test_dc(hwnd, hdc);
1
0
0
0
Roderick Colenbrander : wined3d: Make sure wglFlush is not between ENTER_GL /LEAVE_GL.
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: e91f4ae7761034a67cf909ce5cf569b9294d0031 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e91f4ae7761034a67cf909ce5…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Fri May 14 12:56:43 2010 +0200 wined3d: Make sure wglFlush is not between ENTER_GL/LEAVE_GL. --- dlls/wined3d/directx.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 4df04fa..eb5a16d 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -529,9 +529,12 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info) checkGLcall("Loading the PBO test texture"); GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + LEAVE_GL(); + wglFinish(); /* just to be sure */ memset(check, 0, sizeof(check)); + ENTER_GL(); glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, check); checkGLcall("Reading back the PBO test texture");
1
0
0
0
Alexandre Julliard : Fix the bitmap info size computation when masks are present.
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: 162d95a3cea74ce2a25f3af02a8ad935e85d66ae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=162d95a3cea74ce2a25f3af02…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 14 17:17:46 2010 +0200 Fix the bitmap info size computation when masks are present. --- dlls/gdi32/dib.c | 6 +++--- dlls/user32/cursoricon.c | 6 +++--- dlls/winex11.drv/dib.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index 1b34a34..b19cb9d 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -123,7 +123,7 @@ int DIB_GetDIBImageBytes( int width, int height, int depth ) */ int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) { - int colors, masks = 0; + unsigned int colors, size, masks = 0; if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) { @@ -139,8 +139,8 @@ int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) if (!colors && (info->bmiHeader.biBitCount <= 8)) colors = 1 << info->bmiHeader.biBitCount; if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3; - return info->bmiHeader.biSize + masks * sizeof(DWORD) + colors * - ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD)); + size = max( info->bmiHeader.biSize, sizeof(BITMAPINFOHEADER) + masks * sizeof(DWORD) ); + return size + colors * ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD)); } } diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 96827c2..8cccbbe 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -304,7 +304,7 @@ static int get_dib_width_bytes( int width, int depth ) */ static int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) { - int colors, masks = 0; + unsigned int colors, size, masks = 0; if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) { @@ -321,8 +321,8 @@ static int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) if (!colors && (info->bmiHeader.biBitCount <= 8)) colors = 1 << info->bmiHeader.biBitCount; if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3; - return info->bmiHeader.biSize + masks * sizeof(DWORD) + colors * - ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD)); + size = max( info->bmiHeader.biSize, sizeof(BITMAPINFOHEADER) + masks * sizeof(DWORD) ); + return size + colors * ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD)); } } diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index 95e3511..cf58e8b 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -193,7 +193,7 @@ static int X11DRV_DIB_GetDIBImageBytes( int width, int height, int depth ) */ int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) { - unsigned int colors, masks = 0; + unsigned int colors, size, masks = 0; if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) { @@ -208,8 +208,8 @@ int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) if (!colors && (info->bmiHeader.biBitCount <= 8)) colors = 1 << info->bmiHeader.biBitCount; if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3; - return info->bmiHeader.biSize + masks * sizeof(DWORD) + colors * - ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD)); + size = max( info->bmiHeader.biSize, sizeof(BITMAPINFOHEADER) + masks * sizeof(DWORD) ); + return size + colors * ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD)); } }
1
0
0
0
Alexandre Julliard : comctl32: Always alpha blend images for 32-bpp imagelists.
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: 91948f9ce84735c61cf733e767929fac541b0977 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91948f9ce84735c61cf733e76…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 14 13:50:38 2010 +0200 comctl32: Always alpha blend images for 32-bpp imagelists. --- dlls/comctl32/imagelist.c | 36 ++++++++++++++++++++++-------------- dlls/comctl32/tests/imagelist.c | 2 +- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 2083d39..bd1530e 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -1142,16 +1142,15 @@ ImageList_DrawEx (HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, - int src_x, int src_y, int cx, int cy, int alpha ) + int src_x, int src_y, int cx, int cy, BLENDFUNCTION func ) { - BLENDFUNCTION func; BOOL ret = FALSE; HDC hdc; HBITMAP bmp = 0, mask = 0; BITMAPINFO *info; void *bits, *mask_bits; unsigned int *ptr; - int i, j, has_alpha = 0; + int i, j; if (!(hdc = CreateCompatibleDC( 0 ))) return FALSE; if (!(info = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( BITMAPINFO, bmiColors[256] )))) goto done; @@ -1170,8 +1169,6 @@ static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int des SelectObject( hdc, bmp ); BitBlt( hdc, 0, 0, cx, cy, himl->hdcImage, src_x, src_y, SRCCOPY ); - for (i = 0, ptr = bits; i < cx * cy; i++) if ((has_alpha = (ptr[i] & 0xff000000) != 0)) break; - if (himl->hbmMask) { unsigned int width_bytes = (cx + 31) / 32 * 4; @@ -1186,13 +1183,9 @@ static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int des for (i = 0, ptr = bits; i < cy; i++) for (j = 0; j < cx; j++, ptr++) if ((((BYTE *)mask_bits)[i * width_bytes + j / 8] << (j % 8)) & 0x80) *ptr = 0; - else if (!has_alpha) *ptr |= 0xff000000; + else *ptr |= 0xff000000; } - func.BlendOp = AC_SRC_OVER; - func.BlendFlags = 0; - func.SourceConstantAlpha = alpha; - func.AlphaFormat = AC_SRC_ALPHA; ret = GdiAlphaBlend( dest_dc, dest_x, dest_y, cx, cy, hdc, 0, 0, cx, cy, func ); done: @@ -1229,6 +1222,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) HIMAGELIST himl; HBRUSH hOldBrush; POINT pt; + BOOL has_alpha; if (!pimldp || !(himl = pimldp->himl)) return FALSE; if (!is_valid(himl)) return FALSE; @@ -1278,14 +1272,25 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) oldImageFg = SetTextColor( hImageDC, RGB( 0, 0, 0 ) ); oldImageBk = SetBkColor( hImageDC, RGB( 0xff, 0xff, 0xff ) ); - if (fState & ILS_ALPHA) + has_alpha = (himl->has_alpha && himl->has_alpha[pimldp->i]); + if (!bMask && (has_alpha || (fState & ILS_ALPHA))) { COLORREF colour; + BLENDFUNCTION func; + + func.BlendOp = AC_SRC_OVER; + func.BlendFlags = 0; + func.SourceConstantAlpha = (fState & ILS_ALPHA) ? pimldp->Frame : 255; + func.AlphaFormat = AC_SRC_ALPHA; if (bIsTransparent) { - bResult = alpha_blend_image( himl, pimldp->hdcDst, pimldp->x, pimldp->y, - pt.x, pt.y, cx, cy, pimldp->Frame ); + if (himl->uBitsPixel == 32) /* we already have an alpha channel in this case */ + bResult = GdiAlphaBlend( pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy, + himl->hdcImage, pt.x, pt.y, cx, cy, func ); + else + bResult = alpha_blend_image( himl, pimldp->hdcDst, pimldp->x, pimldp->y, + pt.x, pt.y, cx, cy, func ); goto end; } colour = pimldp->rgbBk; @@ -1294,7 +1299,10 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) hOldBrush = SelectObject (hImageDC, CreateSolidBrush (colour)); PatBlt( hImageDC, 0, 0, cx, cy, PATCOPY ); - alpha_blend_image( himl, hImageDC, 0, 0, pt.x, pt.y, cx, cy, pimldp->Frame ); + if (himl->uBitsPixel == 32) + GdiAlphaBlend( hImageDC, 0, 0, cx, cy, himl->hdcImage, pt.x, pt.y, cx, cy, func ); + else + alpha_blend_image( himl, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func ); DeleteObject (SelectObject (hImageDC, hOldBrush)); bResult = BitBlt( pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy, hImageDC, 0, 0, SRCCOPY ); goto end; diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c index b80f351..43eeeca 100644 --- a/dlls/comctl32/tests/imagelist.c +++ b/dlls/comctl32/tests/imagelist.c @@ -1201,7 +1201,7 @@ static void test_ImageList_DrawIndirect(void) check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iAlphaImage, ILD_PRESERVEALPHA, 0x005D6F81, __LINE__); } - todo_wine check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iTransparentImage, ILD_NORMAL, 0x00FFFFFF, __LINE__); + check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iTransparentImage, ILD_NORMAL, 0x00FFFFFF, __LINE__); check_ImageList_DrawIndirect_ILD_ROP(hdcDst, himl, bits, iImage, SRCCOPY, 0x00ABCDEF, __LINE__); check_ImageList_DrawIndirect_ILD_ROP(hdcDst, himl, bits, iImage, SRCINVERT, 0x00543210, __LINE__);
1
0
0
0
Alexandre Julliard : comctl32: Store an alpha channel present flag for each image in an imagelist.
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: 33e7d0282b926106957c358e000fb566556ba5dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33e7d0282b926106957c358e0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 14 13:44:20 2010 +0200 comctl32: Store an alpha channel present flag for each image in an imagelist. --- dlls/comctl32/imagelist.c | 23 ++++++++++++++++++++++- dlls/comctl32/imagelist.h | 1 + 2 files changed, 23 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 1eb3bc6..2083d39 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -207,6 +207,7 @@ static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count, } else { + if (himl->has_alpha) himl->has_alpha[pos + n] = 1; StretchBlt( himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, hdc, n * width, 0, width, height, SRCCOPY ); } @@ -294,6 +295,18 @@ IMAGELIST_InternalExpandBitmaps(HIMAGELIST himl, INT nImageCount) himl->hbmMask = hbmNewBitmap; } + if (himl->has_alpha) + { + char *new_alpha = HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, + himl->has_alpha, himl->cMaxImage ); + if (new_alpha) himl->has_alpha = new_alpha; + else + { + HeapFree( GetProcessHeap(), 0, himl->has_alpha ); + himl->has_alpha = NULL; + } + } + himl->cMaxImage = nNewCount; DeleteDC (hdcBitmap); @@ -728,6 +741,11 @@ ImageList_Create (INT cx, INT cy, UINT flags, else himl->hbmMask = 0; + if (himl->uBitsPixel == 32) + himl->has_alpha = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, himl->cMaxImage ); + else + himl->has_alpha = NULL; + /* create blending brushes */ hbmTemp = CreateBitmap (8, 8, 1, 1, aBitBlend25); himl->hbrBlend25 = CreatePatternBrush (hbmTemp); @@ -1430,7 +1448,7 @@ ImageList_Duplicate (HIMAGELIST himlSrc) } himlDst = ImageList_Create (himlSrc->cx, himlSrc->cy, himlSrc->flags, - himlSrc->cInitial, himlSrc->cGrow); + himlSrc->cCurImage, himlSrc->cGrow); if (himlDst) { @@ -1446,6 +1464,8 @@ ImageList_Duplicate (HIMAGELIST himlSrc) himlDst->cCurImage = himlSrc->cCurImage; himlDst->cMaxImage = himlSrc->cMaxImage; + if (himlSrc->has_alpha && himlDst->has_alpha) + memcpy( himlDst->has_alpha, himlSrc->has_alpha, himlDst->cCurImage ); } return himlDst; } @@ -3132,6 +3152,7 @@ static ULONG WINAPI ImageListImpl_Release(IImageList *iface) if (This->hbrBlend50) DeleteObject (This->hbrBlend50); This->lpVtbl = NULL; + HeapFree(GetProcessHeap(), 0, This->has_alpha); HeapFree(GetProcessHeap(), 0, This); } diff --git a/dlls/comctl32/imagelist.h b/dlls/comctl32/imagelist.h index a979ebf..f6f1d1b 100644 --- a/dlls/comctl32/imagelist.h +++ b/dlls/comctl32/imagelist.h @@ -53,6 +53,7 @@ struct _IMAGELIST HBRUSH hbrBlend50; INT cInitial; UINT uBitsPixel; + char *has_alpha; LONG ref; /* reference count */ };
1
0
0
0
Alexandre Julliard : comctl32: Also generate an alpha channel when replacing an image or icon in an imagelist .
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: 528722e4e16ec918d5daf3bee8bbb95fd35a7582 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=528722e4e16ec918d5daf3bee…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 14 13:41:35 2010 +0200 comctl32: Also generate an alpha channel when replacing an image or icon in an imagelist. --- dlls/comctl32/imagelist.c | 35 +++++++++++++++++++++++++++-------- 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index acad6c2..1eb3bc6 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -2305,7 +2305,6 @@ ImageList_Replace (HIMAGELIST himl, INT i, HBITMAP hbmImage, { HDC hdcImage; BITMAP bmp; - HBITMAP hOldBitmap; POINT pt; TRACE("%p %d %p %p\n", himl, i, hbmImage, hbmMask); @@ -2326,7 +2325,10 @@ ImageList_Replace (HIMAGELIST himl, INT i, HBITMAP hbmImage, hdcImage = CreateCompatibleDC (0); /* Replace Image */ - hOldBitmap = SelectObject (hdcImage, hbmImage); + SelectObject (hdcImage, hbmImage); + + if (add_with_alpha( himl, hdcImage, i, 1, bmp.bmWidth, bmp.bmHeight, hbmImage, hbmMask )) + goto done; imagelist_point_from_index(himl, i, &pt); StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, @@ -2351,7 +2353,7 @@ ImageList_Replace (HIMAGELIST himl, INT i, HBITMAP hbmImage, himl->hdcMask, pt.x, pt.y, 0x220326); /* NOTSRCAND */ } - SelectObject (hdcImage, hOldBitmap); +done: DeleteDC (hdcImage); return TRUE; @@ -2378,7 +2380,6 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon) { HDC hdcImage; HICON hBestFitIcon; - HBITMAP hbmOldSrc; ICONINFO ii; BITMAP bmp; BOOL ret; @@ -2439,6 +2440,25 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon) if (hdcImage == 0) ERR("invalid hdcImage!\n"); + if (himl->uBitsPixel == 32) + { + if (!ii.hbmColor) + { + UINT height = bmp.bmHeight / 2; + HDC hdcMask = CreateCompatibleDC( 0 ); + HBITMAP color = CreateBitmap( bmp.bmWidth, height, 1, 1, NULL ); + SelectObject( hdcImage, color ); + SelectObject( hdcMask, ii.hbmMask ); + BitBlt( hdcImage, 0, 0, bmp.bmWidth, height, hdcMask, 0, height, SRCCOPY ); + add_with_alpha( himl, hdcImage, nIndex, 1, bmp.bmWidth, height, color, ii.hbmMask ); + DeleteDC( hdcMask ); + DeleteObject( color ); + } + else add_with_alpha( himl, hdcImage, nIndex, 1, bmp.bmWidth, bmp.bmHeight, ii.hbmColor, ii.hbmMask ); + + goto done; + } + imagelist_point_from_index(himl, nIndex, &pt); SetTextColor(himl->hdcImage, RGB(0,0,0)); @@ -2446,7 +2466,7 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon) if (ii.hbmColor) { - hbmOldSrc = SelectObject (hdcImage, ii.hbmColor); + SelectObject (hdcImage, ii.hbmColor); StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY); if (himl->hbmMask) @@ -2459,7 +2479,7 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon) else { UINT height = bmp.bmHeight / 2; - hbmOldSrc = SelectObject (hdcImage, ii.hbmMask); + SelectObject (hdcImage, ii.hbmMask); StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, hdcImage, 0, height, bmp.bmWidth, height, SRCCOPY); if (himl->hbmMask) @@ -2467,8 +2487,7 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon) hdcImage, 0, 0, bmp.bmWidth, height, SRCCOPY); } - SelectObject (hdcImage, hbmOldSrc); - +done: DestroyIcon(hBestFitIcon); if (hdcImage) DeleteDC (hdcImage);
1
0
0
0
Alexandre Julliard : comctl32: Generate an alpha channel if necessary when adding images to a 32-bit imagelist .
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: f02adf3e2b3efc23f62c38b9c8f43f169888434f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f02adf3e2b3efc23f62c38b9c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 14 13:38:54 2010 +0200 comctl32: Generate an alpha channel if necessary when adding images to a 32-bit imagelist. --- dlls/comctl32/imagelist.c | 110 +++++++++++++++++++++++++++++++++++---- dlls/comctl32/tests/imagelist.c | 2 +- 2 files changed, 101 insertions(+), 11 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index d1bf7f6..acad6c2 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -138,6 +138,92 @@ static inline void imagelist_copy_images( HIMAGELIST himl, HDC hdcSrc, HDC hdcDe } } +/* add images with an alpha channel when the image list is 32 bpp */ +static BOOL add_with_alpha( HIMAGELIST himl, HDC hdc, int pos, int count, + int width, int height, HBITMAP hbmImage, HBITMAP hbmMask ) +{ + BOOL ret = FALSE; + HDC hdcMask = 0; + BITMAP bm; + BITMAPINFO *info; + DWORD *bits = NULL; + BYTE *mask_bits = NULL; + int i, j, n; + POINT pt; + DWORD mask_width; + + if (himl->uBitsPixel != 32) return FALSE; + if (!GetObjectW( hbmImage, sizeof(bm), &bm )) return FALSE; + SelectObject( hdc, hbmImage ); + mask_width = (bm.bmWidth + 31) / 32 * 4; + + if (!(info = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( BITMAPINFO, bmiColors[256] )))) goto done; + info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + info->bmiHeader.biWidth = bm.bmWidth; + info->bmiHeader.biHeight = -height; + info->bmiHeader.biPlanes = 1; + info->bmiHeader.biBitCount = 32; + info->bmiHeader.biCompression = BI_RGB; + info->bmiHeader.biSizeImage = bm.bmWidth * height * 4; + info->bmiHeader.biXPelsPerMeter = 0; + info->bmiHeader.biYPelsPerMeter = 0; + info->bmiHeader.biClrUsed = 0; + info->bmiHeader.biClrImportant = 0; + if (!(bits = HeapAlloc( GetProcessHeap(), 0, info->bmiHeader.biSizeImage ))) goto done; + if (!GetDIBits( hdc, hbmImage, 0, height, bits, info, DIB_RGB_COLORS )) goto done; + + if (hbmMask) + { + info->bmiHeader.biBitCount = 1; + info->bmiHeader.biSizeImage = mask_width * height; + if (!(mask_bits = HeapAlloc( GetProcessHeap(), 0, info->bmiHeader.biSizeImage ))) goto done; + if (!GetDIBits( hdc, hbmMask, 0, height, mask_bits, info, DIB_RGB_COLORS )) goto done; + /* restore values for color info */ + info->bmiHeader.biBitCount = 32; + info->bmiHeader.biSizeImage = bm.bmWidth * height * 4; + hdcMask = CreateCompatibleDC( 0 ); + SelectObject( hdcMask, hbmMask ); + } + + for (n = 0; n < count; n++) + { + int has_alpha = 0; + + imagelist_point_from_index( himl, pos + n, &pt ); + + /* check if bitmap has an alpha channel */ + for (i = 0; i < height && !has_alpha; i++) + for (j = n * width; j < (n + 1) * width; j++) + if ((has_alpha = ((bits[i * bm.bmWidth + j] & 0xff000000) != 0))) break; + + if (!has_alpha) /* generate alpha channel from the mask */ + { + for (i = 0; i < height; i++) + for (j = n * width; j < (n + 1) * width; j++) + if (!mask_bits || !((mask_bits[i * mask_width + j / 8] << (j % 8)) & 0x80)) + bits[i * bm.bmWidth + j] |= 0xff000000; + StretchDIBits( himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, + n * width, 0, width, height, bits, info, DIB_RGB_COLORS, SRCCOPY ); + } + else + { + StretchBlt( himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, + hdc, n * width, 0, width, height, SRCCOPY ); + } + + if (hdcMask) StretchBlt( himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy, + hdcMask, n * width, 0, width, height, SRCCOPY ); + } + ret = TRUE; + +done: + if (hdcMask) DeleteDC( hdcMask ); + HeapFree( GetProcessHeap(), 0, info ); + HeapFree( GetProcessHeap(), 0, bits ); + HeapFree( GetProcessHeap(), 0, mask_bits ); + return ret; +} + /************************************************************************* * IMAGELIST_InternalExpandBitmaps [Internal] * @@ -232,10 +318,9 @@ IMAGELIST_InternalExpandBitmaps(HIMAGELIST himl, INT nImageCount) INT WINAPI ImageList_Add (HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask) { - HDC hdcBitmap, hdcTemp; + HDC hdcBitmap, hdcTemp = 0; INT nFirstIndex, nImageCount, i; BITMAP bmp; - HBITMAP hOldBitmap, hOldBitmapTemp; POINT pt; TRACE("himl=%p hbmimage=%p hbmmask=%p\n", himl, hbmImage, hbmMask); @@ -256,7 +341,17 @@ ImageList_Add (HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask) hdcBitmap = CreateCompatibleDC(0); - hOldBitmap = SelectObject(hdcBitmap, hbmImage); + SelectObject(hdcBitmap, hbmImage); + + if (add_with_alpha( himl, hdcBitmap, himl->cCurImage, nImageCount, + himl->cx, min( himl->cy, bmp.bmHeight), hbmImage, hbmMask )) + goto done; + + if (himl->hbmMask) + { + hdcTemp = CreateCompatibleDC(0); + SelectObject(hdcTemp, hbmMask); + } for (i=0; i<nImageCount; i++) { @@ -270,22 +365,17 @@ ImageList_Add (HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask) if (!himl->hbmMask) continue; - hdcTemp = CreateCompatibleDC(0); - hOldBitmapTemp = SelectObject(hdcTemp, hbmMask); - BitBlt( himl->hdcMask, pt.x, pt.y, himl->cx, bmp.bmHeight, hdcTemp, i*himl->cx, 0, SRCCOPY ); - SelectObject(hdcTemp, hOldBitmapTemp); - DeleteDC(hdcTemp); - /* Remove the background from the image */ BitBlt( himl->hdcImage, pt.x, pt.y, himl->cx, bmp.bmHeight, himl->hdcMask, pt.x, pt.y, 0x220326 ); /* NOTSRCAND */ } + if (hdcTemp) DeleteDC(hdcTemp); - SelectObject(hdcBitmap, hOldBitmap); +done: DeleteDC(hdcBitmap); nFirstIndex = himl->cCurImage; diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c index 9542e64..b80f351 100644 --- a/dlls/comctl32/tests/imagelist.c +++ b/dlls/comctl32/tests/imagelist.c @@ -1216,7 +1216,7 @@ static void test_ImageList_DrawIndirect(void) check_ImageList_DrawIndirect_fState(hdcDst, himl, bits, iImage, ILD_NORMAL, ILS_GLOW, 0, 0x00ABCDEF, __LINE__); check_ImageList_DrawIndirect_fState(hdcDst, himl, bits, iImage, ILD_NORMAL, ILS_SHADOW, 0, 0x00ABCDEF, __LINE__); - todo_wine check_ImageList_DrawIndirect_fState(hdcDst, himl, bits, iImage, ILD_NORMAL, ILS_ALPHA, 127, 0x00D5E6F7, __LINE__); + check_ImageList_DrawIndirect_fState(hdcDst, himl, bits, iImage, ILD_NORMAL, ILS_ALPHA, 127, 0x00D5E6F7, __LINE__); todo_wine check_ImageList_DrawIndirect_broken(hdcDst, himl, bits, iAlphaImage, ILD_NORMAL, ILS_ALPHA, 127, 0x00E9F2FB, 0x00AEB7C0, __LINE__); todo_wine check_ImageList_DrawIndirect_broken(hdcDst, himl, bits, iAlphaImage, ILD_NORMAL, ILS_NORMAL, 127, 0x00E9F2FB, 0x00D3E5F7, __LINE__);
1
0
0
0
Alexandre Julliard : comctl32: Make ImageList_AddMasked call ImageList_Add instead of duplicating the functionality .
by Alexandre Julliard
14 May '10
14 May '10
Module: wine Branch: master Commit: f75c7b5f71e4154f98975078db01e01dbc11f624 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f75c7b5f71e4154f98975078d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 14 13:37:04 2010 +0200 comctl32: Make ImageList_AddMasked call ImageList_Add instead of duplicating the functionality. --- dlls/comctl32/imagelist.c | 36 +++++++----------------------------- 1 files changed, 7 insertions(+), 29 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index cf6fe97..d1bf7f6 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -335,12 +335,10 @@ INT WINAPI ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask) { HDC hdcMask, hdcBitmap; - INT i, nIndex, nImageCount; + INT ret; BITMAP bmp; - HBITMAP hOldBitmap; - HBITMAP hMaskBitmap=0; + HBITMAP hMaskBitmap; COLORREF bkColor; - POINT pt; TRACE("himl=%p hbitmap=%p clrmask=%x\n", himl, hBitmap, clrMask); if (!is_valid(himl)) @@ -349,18 +347,8 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask) if (!GetObjectW(hBitmap, sizeof(BITMAP), &bmp)) return -1; - if (himl->cx > 0) - nImageCount = bmp.bmWidth / himl->cx; - else - nImageCount = 0; - - IMAGELIST_InternalExpandBitmaps(himl, nImageCount); - - nIndex = himl->cCurImage; - himl->cCurImage += nImageCount; - hdcBitmap = CreateCompatibleDC(0); - hOldBitmap = SelectObject(hdcBitmap, hBitmap); + SelectObject(hdcBitmap, hBitmap); /* Create a temp Mask so we can remove the background of the Image */ hdcMask = CreateCompatibleDC(0); @@ -389,23 +377,13 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask) */ BitBlt(hdcBitmap, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcMask, 0, 0, 0x220326); - /* Copy result to the imagelist */ - for (i=0; i<nImageCount; i++) - { - imagelist_point_from_index( himl, nIndex + i, &pt ); - BitBlt(himl->hdcImage, pt.x, pt.y, himl->cx, bmp.bmHeight, - hdcBitmap, i*himl->cx, 0, SRCCOPY); - BitBlt(himl->hdcMask, pt.x, pt.y, himl->cx, bmp.bmHeight, - hdcMask, i*himl->cx, 0, SRCCOPY); - } - - /* Clean up */ - SelectObject(hdcBitmap, hOldBitmap); DeleteDC(hdcBitmap); - DeleteObject(hMaskBitmap); DeleteDC(hdcMask); - return nIndex; + ret = ImageList_Add( himl, hBitmap, hMaskBitmap ); + + DeleteObject(hMaskBitmap); + return ret; }
1
0
0
0
← Newer
1
...
51
52
53
54
55
56
57
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200