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
July
June
May
April
March
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
January 2006
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
4 participants
617 discussions
Start a n
N
ew thread
Michael Kaufmann : static control: Better STM_GETIMAGE.
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: 2b8cda7162263faae59e4afc5b4aca0d7c467046 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=2b8cda7162263faae59e4af…
Author: Michael Kaufmann <hallo(a)michael-kaufmann.ch> Date: Tue Jan 17 16:05:25 2006 +0100 static control: Better STM_GETIMAGE. STM_GETIMAGE returns NULL if the given image type doesn't match the control's style. --- dlls/user/static.c | 34 +++++++++++++++++++++++++++++----- 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/dlls/user/static.c b/dlls/user/static.c index 4281a6a..bd28668 100644 --- a/dlls/user/static.c +++ b/dlls/user/static.c @@ -201,6 +201,32 @@ static HENHMETAFILE STATIC_SetEnhMetaFil } /*********************************************************************** + * STATIC_GetImage + * + * Gets the bitmap for an SS_BITMAP control, the icon/cursor for an + * SS_ICON control or the enhanced metafile for an SS_ENHMETAFILE control. + */ +static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style ) +{ + switch(style & SS_TYPEMASK) + { + case SS_ICON: + if ((wParam != IMAGE_ICON) && + (wParam != IMAGE_CURSOR)) return NULL; + break; + case SS_BITMAP: + if (wParam != IMAGE_BITMAP) return NULL; + break; + case SS_ENHMETAFILE: + if (wParam != IMAGE_ENHMETAFILE) return NULL; + break; + default: + return NULL; + } + return (HANDLE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ); +} + +/*********************************************************************** * STATIC_LoadIconA * * Load the icon for an SS_ICON control. @@ -473,13 +499,11 @@ static LRESULT StaticWndProc_common( HWN return 0; case STM_GETIMAGE: - /* FIXME: Return NULL if wParam doesn't match the control's style. - wParam is IMAGE_BITMAP, IMAGE_CURSOR, IMAGE_ENHMETAFILE - or IMAGE_ICON */ + return (LRESULT)STATIC_GetImage( hwnd, wParam, full_style ); + case STM_GETICON16: case STM_GETICON: - /* FIXME: Return NULL if this control doesn't show an icon */ - return GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ); + return (LRESULT)STATIC_GetImage( hwnd, IMAGE_ICON, full_style ); case STM_SETIMAGE: switch(wParam) {
1
0
0
0
Michael Kaufmann : static control: Support SS_REALSIZEIMAGE.
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: 46d007cedb89b37122217c50f8cc8fe17edb25a6 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=46d007cedb89b37122217c5…
Author: Michael Kaufmann <hallo(a)michael-kaufmann.ch> Date: Tue Jan 17 16:04:40 2006 +0100 static control: Support SS_REALSIZEIMAGE. - Support SS_REALSIZEIMAGE (this flag means "it's not necessary to load icons in the default icon size"). - SS_ICON: Ability to display cursors. --- dlls/user/static.c | 43 ++++++++++++++++++++++++++++++++----------- 1 files changed, 32 insertions(+), 11 deletions(-) diff --git a/dlls/user/static.c b/dlls/user/static.c index 0b8cb29..4281a6a 100644 --- a/dlls/user/static.c +++ b/dlls/user/static.c @@ -29,7 +29,6 @@ * TODO: * * Styles - * - SS_REALSIZEIMAGE * - SS_RIGHTJUST * * Notifications @@ -206,12 +205,23 @@ static HENHMETAFILE STATIC_SetEnhMetaFil * * Load the icon for an SS_ICON control. */ -static HICON STATIC_LoadIconA( HWND hwnd, LPCSTR name ) +static HICON STATIC_LoadIconA( HWND hwnd, LPCSTR name, DWORD style ) { HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); - HICON hicon = LoadIconA( hInstance, name ); - if (!hicon) hicon = LoadIconA( 0, name ); - return hicon; + if ((style & SS_REALSIZEIMAGE) != 0) + { + return LoadImageA(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED); + } + else + { + HICON hicon = LoadIconA( hInstance, name ); + if (!hicon) hicon = LoadCursorA( hInstance, name ); + if (!hicon) hicon = LoadIconA( 0, name ); + /* Windows doesn't try to load a standard cursor, + probably because most IDs for standard cursors conflict + with the IDs for standard icons anyway */ + return hicon; + } } /*********************************************************************** @@ -219,12 +229,23 @@ static HICON STATIC_LoadIconA( HWND hwnd * * Load the icon for an SS_ICON control. */ -static HICON STATIC_LoadIconW( HWND hwnd, LPCWSTR name ) +static HICON STATIC_LoadIconW( HWND hwnd, LPCWSTR name, DWORD style ) { HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); - HICON hicon = LoadIconW( hInstance, name ); - if (!hicon) hicon = LoadIconW( 0, name ); - return hicon; + if ((style & SS_REALSIZEIMAGE) != 0) + { + return LoadImageW(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED); + } + else + { + HICON hicon = LoadIconW( hInstance, name ); + if (!hicon) hicon = LoadCursorW( hInstance, name ); + if (!hicon) hicon = LoadIconW( 0, name ); + /* Windows doesn't try to load a standard cursor, + probably because most IDs for standard cursors conflict + with the IDs for standard icons anyway */ + return hicon; + } } /*********************************************************************** @@ -368,9 +389,9 @@ static LRESULT StaticWndProc_common( HWN { HICON hIcon; if(unicode) - hIcon = STATIC_LoadIconW(hwnd, (LPCWSTR)lParam); + hIcon = STATIC_LoadIconW(hwnd, (LPCWSTR)lParam, full_style); else - hIcon = STATIC_LoadIconA(hwnd, (LPCSTR)lParam); + hIcon = STATIC_LoadIconA(hwnd, (LPCSTR)lParam, full_style); /* FIXME : should we also return the previous hIcon here ??? */ STATIC_SetIcon(hwnd, hIcon, full_style); break;
1
0
0
0
Michael Kaufmann : static control: Support SS_REALSIZECONTROL.
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: 66b5020e020c65e0302f4fca56a6b0b47efba0ab URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=66b5020e020c65e0302f4fc…
Author: Michael Kaufmann <hallo(a)michael-kaufmann.ch> Date: Tue Jan 17 16:03:44 2006 +0100 static control: Support SS_REALSIZECONTROL. - Support SS_REALSIZECONTROL (this flag means "don't resize the control to the size of the bitmap/icon"). - Always call GlobalUnlock16 after GlobalLock16. --- dlls/user/static.c | 55 ++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 40 insertions(+), 15 deletions(-) diff --git a/dlls/user/static.c b/dlls/user/static.c index a3483c6..0b8cb29 100644 --- a/dlls/user/static.c +++ b/dlls/user/static.c @@ -29,7 +29,6 @@ * TODO: * * Styles - * - SS_REALSIZECONTROL * - SS_REALSIZEIMAGE * - SS_RIGHTJUST * @@ -119,20 +118,33 @@ const struct builtin_class_descr STATIC_ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style ) { HICON prevIcon; - CURSORICONINFO *info = hicon?(CURSORICONINFO *) GlobalLock16(HICON_16(hicon)):NULL; - + CURSORICONINFO * info; + if ((style & SS_TYPEMASK) != SS_ICON) return 0; + info = hicon?(CURSORICONINFO *) GlobalLock16(HICON_16(hicon)):NULL; if (hicon && !info) { - ERR("hicon != 0, but info == 0\n"); - return 0; + WARN("hicon != 0, but info == 0\n"); + return 0; } prevIcon = (HICON)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hicon ); - if (hicon && !(style & SS_CENTERIMAGE)) + if (hicon && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL)) { - SetWindowPos( hwnd, 0, 0, 0, info->nWidth, info->nHeight, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); - GlobalUnlock16(HICON_16(hicon)); + /* Windows currently doesn't implement SS_RIGHTJUST */ + /* + if ((style & SS_RIGHTJUST) != 0) + { + RECT wr; + GetWindowRect(hwnd, &wr); + SetWindowPos( hwnd, 0, wr.right - info->nWidth, wr.bottom - info->nHeight, + info->nWidth, info->nHeight, SWP_NOACTIVATE | SWP_NOZORDER ); + } + else */ + { + SetWindowPos( hwnd, 0, 0, 0, info->nWidth, info->nHeight, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); + } } + if (info) GlobalUnlock16(HICON_16(hicon)); return prevIcon; } @@ -147,16 +159,29 @@ static HBITMAP STATIC_SetBitmap( HWND hw if ((style & SS_TYPEMASK) != SS_BITMAP) return 0; if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP) { - ERR("hBitmap != 0, but it's not a bitmap\n"); - return 0; + WARN("hBitmap != 0, but it's not a bitmap\n"); + return 0; } hOldBitmap = (HBITMAP)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap ); - if (hBitmap && !(style & SS_CENTERIMAGE)) + if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL)) { BITMAP bm; GetObjectW(hBitmap, sizeof(bm), &bm); - SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); + /* Windows currently doesn't implement SS_RIGHTJUST */ + /* + if ((style & SS_RIGHTJUST) != 0) + { + RECT wr; + GetWindowRect(hwnd, &wr); + SetWindowPos( hwnd, 0, wr.right - bm.bmWidth, wr.bottom - bm.bmHeight, + bm.bmWidth, bm.bmHeight, SWP_NOACTIVATE | SWP_NOZORDER ); + } + else */ + { + SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); + } + } return hOldBitmap; } @@ -170,7 +195,7 @@ static HENHMETAFILE STATIC_SetEnhMetaFil { if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return 0; if (hEnhMetaFile && GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE) { - ERR("hEnhMetaFile != 0, but it's not an enhanced metafile\n"); + WARN("hEnhMetaFile != 0, but it's not an enhanced metafile\n"); return 0; } return (HENHMETAFILE)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hEnhMetaFile );
1
0
0
0
Michael Kaufmann : static control: Background of enhanced metafiles.
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: 910f4bb50e0e76fd5cd0110be144f684b6aab575 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=910f4bb50e0e76fd5cd0110…
Author: Michael Kaufmann <hallo(a)michael-kaufmann.ch> Date: Tue Jan 17 16:01:40 2006 +0100 static control: Background of enhanced metafiles. - Always paint the background of static controls displaying enhanced metafiles. - Also paint the background if there's no metafile to display. --- dlls/user/static.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/user/static.c b/dlls/user/static.c index 408a152..a3483c6 100644 --- a/dlls/user/static.c +++ b/dlls/user/static.c @@ -708,17 +708,18 @@ static void STATIC_PaintBitmapfn(HWND hw static void STATIC_PaintEnhMetafn(HWND hwnd, HDC hdc, DWORD style ) { HENHMETAFILE hEnhMetaFile; - - /* message is still sent, even if the returned brush is not used */ - SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, - (WPARAM)hdc, (LPARAM)hwnd ); - + RECT rc; + HBRUSH hbrush; + + GetClientRect(hwnd, &rc); + hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc); + FillRect(hdc, &rc, hbrush); if ((hEnhMetaFile = (HENHMETAFILE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ))) { - RECT clientRect; - if(GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE) return; - GetClientRect(hwnd, &clientRect); - PlayEnhMetaFile(hdc, hEnhMetaFile, &clientRect); + /* The control's current font is not selected into the + device context! */ + if (GetObjectType(hEnhMetaFile) == OBJ_ENHMETAFILE) + PlayEnhMetaFile(hdc, hEnhMetaFile, &rc); } }
1
0
0
0
Michael Kaufmann : static control: Support text style flags.
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: 7effdb0b23cb112e0e89490e8bf3ed828b9d9289 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=7effdb0b23cb112e0e89490…
Author: Michael Kaufmann <hallo(a)michael-kaufmann.ch> Date: Tue Jan 17 16:00:47 2006 +0100 static control: Support text style flags. - Support DT_END_ELLIPSIS, DT_PATH_ELLIPSIS and DT_WORD_ELLIPSIS. - Paint simple text without prefixes (SS_SIMPLE | SS_NOPREFIX) with the ExtTextOut function like the native control does. - Gray text color: Only for non-simple static controls. --- dlls/user/static.c | 78 +++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 58 insertions(+), 20 deletions(-) diff --git a/dlls/user/static.c b/dlls/user/static.c index 082be9f..408a152 100644 --- a/dlls/user/static.c +++ b/dlls/user/static.c @@ -29,13 +29,9 @@ * TODO: * * Styles - * - SS_EDITCONTROL - * - SS_ENDELLIPSIS - * - SS_PATHELLIPSIS * - SS_REALSIZECONTROL * - SS_REALSIZEIMAGE * - SS_RIGHTJUST - * - SS_WORDELLIPSIS * * Notifications * - STN_DISABLE @@ -254,6 +250,20 @@ static VOID STATIC_TryPaintFcn(HWND hwnd } } +static HBRUSH STATIC_SendWmCtlColorStatic(HWND hwnd, HDC hdc) +{ + HBRUSH hBrush = (HBRUSH) SendMessageW( GetParent(hwnd), + WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd ); + if (!hBrush) /* did the app forget to call DefWindowProc ? */ + { + /* FIXME: DefWindowProc should return different colors if a + manifest is present */ + hBrush = (HBRUSH)DefWindowProcW(GetParent(hwnd), WM_CTLCOLORSTATIC, + (WPARAM)hdc, (LPARAM)hwnd); + } + return hBrush; +} + static VOID STATIC_InitColours(void) { color_3ddkshadow = GetSysColor(COLOR_3DDKSHADOW); @@ -504,7 +514,7 @@ static void STATIC_PaintTextfn( HWND hwn { RECT rc; HBRUSH hBrush; - HFONT hFont; + HFONT hFont, hOldFont = NULL; WORD wFormat; INT len; WCHAR *text; @@ -538,28 +548,56 @@ static void STATIC_PaintTextfn( HWND hwn } if (style & SS_NOPREFIX) - wFormat |= DT_NOPREFIX; - if ((style & SS_CENTERIMAGE) && (style & SS_TYPEMASK) != SS_SIMPLE) - wFormat |= DT_SINGLELINE | DT_VCENTER; - - if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET ))) SelectObject( hdc, hFont ); - - if ((style & SS_NOPREFIX) || ((style & SS_TYPEMASK) != SS_SIMPLE)) - { - hBrush = (HBRUSH)SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, - (WPARAM)hdc, (LPARAM)hwnd ); - if (!hBrush) /* did the app forget to call defwindowproc ? */ - hBrush = (HBRUSH)DefWindowProcW(GetParent(hwnd), WM_CTLCOLORSTATIC, - (WPARAM)hdc, (LPARAM)hwnd); + wFormat |= DT_NOPREFIX; + + if ((style & SS_TYPEMASK) != SS_SIMPLE) + { + if (style & SS_CENTERIMAGE) + wFormat |= DT_SINGLELINE | DT_VCENTER; + if (style & SS_EDITCONTROL) + wFormat |= DT_EDITCONTROL; + if (style & SS_ENDELLIPSIS) + wFormat |= DT_SINGLELINE | DT_END_ELLIPSIS; + if (style & SS_PATHELLIPSIS) + wFormat |= DT_SINGLELINE | DT_PATH_ELLIPSIS; + if (style & SS_WORDELLIPSIS) + wFormat |= DT_SINGLELINE | DT_WORD_ELLIPSIS; + } + + if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET ))) + hOldFont = (HFONT)SelectObject( hdc, hFont ); + + /* SS_SIMPLE controls: WM_CTLCOLORSTATIC is sent, but the returned + brush is not used */ + hBrush = STATIC_SendWmCtlColorStatic(hwnd, hdc); + + if ((style & SS_TYPEMASK) != SS_SIMPLE) + { FillRect( hdc, &rc, hBrush ); + if (!IsWindowEnabled(hwnd)) SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT)); } - if (!IsWindowEnabled(hwnd)) SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT)); if (!(len = SendMessageW( hwnd, WM_GETTEXTLENGTH, 0, 0 ))) return; if (!(text = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ))) return; SendMessageW( hwnd, WM_GETTEXT, len + 1, (LPARAM)text ); - DrawTextW( hdc, text, -1, &rc, wFormat ); + + if (((style & SS_TYPEMASK) == SS_SIMPLE) && (style & SS_NOPREFIX)) + { + /* Windows uses the faster ExtTextOut() to draw the text and + to paint the whole client rectangle with the text background + color. Reference: "Static Controls" by Kyle Marsh, 1992 */ + ExtTextOutW( hdc, rc.left, rc.top, ETO_CLIPPED | ETO_OPAQUE, + &rc, text, len, NULL ); + } + else + { + DrawTextW( hdc, text, -1, &rc, wFormat ); + } + HeapFree( GetProcessHeap(), 0, text ); + + if (hFont) + SelectObject( hdc, hOldFont ); } static void STATIC_PaintRectfn( HWND hwnd, HDC hdc, DWORD style )
1
0
0
0
Alex Villacís Lasso : msacm: Add parameter tests for ACM_METRIC_DRIVER_PRIORITY and
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: 5964f663f30aa3ec25cf4eca98dae81cfb99d162 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=5964f663f30aa3ec25cf4ec…
Author: Alex Villacís Lasso <a_villacis(a)palosanto.com> Date: Tue Jan 17 16:00:16 2006 +0100 msacm: Add parameter tests for ACM_METRIC_DRIVER_PRIORITY and ACM_METRIC_DRIVER_SUPPORT. Fix copy&paste mislabeling on acmDriverID test failure. --- dlls/msacm/tests/msacm.c | 55 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 53 insertions(+), 2 deletions(-) diff --git a/dlls/msacm/tests/msacm.c b/dlls/msacm/tests/msacm.c index 1d585fd..4912096 100644 --- a/dlls/msacm/tests/msacm.c +++ b/dlls/msacm/tests/msacm.c @@ -61,6 +61,9 @@ static BOOL CALLBACK DriverEnumProc(HACM MMRESULT rc; ACMDRIVERDETAILS dd; HACMDRIVER had; + + DWORD dwDriverPriority; + DWORD dwDriverSupport; if (winetest_interactive) { trace("id: %p\n", hadid); @@ -139,6 +142,54 @@ static BOOL CALLBACK DriverEnumProc(HACM trace(" Supports %lu filter formats\n", dd.cFilterTags); } + /* try bad pointer */ + rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_PRIORITY, 0); + ok(rc == MMSYSERR_INVALPARAM, + "acmMetrics(): rc = %08x, should be %08x\n", + rc, MMSYSERR_INVALPARAM); + + /* try bad handle */ + rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_PRIORITY, &dwDriverPriority); + ok(rc == MMSYSERR_INVALHANDLE, + "acmMetrics(): rc = %08x, should be %08x\n", + rc, MMSYSERR_INVALHANDLE); + + /* try bad pointer and handle */ + rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_PRIORITY, 0); + ok(rc == MMSYSERR_INVALHANDLE, + "acmMetrics(): rc = %08x, should be %08x\n", + rc, MMSYSERR_INVALHANDLE); + + /* try valid parameters */ + rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_PRIORITY, &dwDriverSupport); + ok(rc == MMSYSERR_NOERROR, + "acmMetrics(): rc = %08x, should be %08x\n", + rc, MMSYSERR_NOERROR); + + /* try bad pointer */ + rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_SUPPORT, 0); + ok(rc == MMSYSERR_INVALPARAM, + "acmMetrics(): rc = %08x, should be %08x\n", + rc, MMSYSERR_INVALPARAM); + + /* try bad handle */ + rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_SUPPORT, &dwDriverSupport); + ok(rc == MMSYSERR_INVALHANDLE, + "acmMetrics(): rc = %08x, should be %08x\n", + rc, MMSYSERR_INVALHANDLE); + + /* try bad pointer and handle */ + rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_SUPPORT, 0); + ok(rc == MMSYSERR_INVALHANDLE, + "acmMetrics(): rc = %08x, should be %08x\n", + rc, MMSYSERR_INVALHANDLE); + + /* try valid parameters */ + rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_SUPPORT, &dwDriverSupport); + ok(rc == MMSYSERR_NOERROR, + "acmMetrics(): rc = %08x, should be %08x\n", + rc, MMSYSERR_NOERROR); + /* try invalid pointer */ rc = acmDriverOpen(0, hadid, 0); ok(rc == MMSYSERR_INVALPARAM, @@ -176,13 +227,13 @@ static BOOL CALLBACK DriverEnumProc(HACM /* try bad handle */ rc = acmDriverID((HACMOBJ)1, &hid, 0); ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(): rc = %08x, should be %08x\n", + "acmDriverID(): rc = %08x, should be %08x\n", rc, MMSYSERR_INVALHANDLE); /* try bad handle and pointer */ rc = acmDriverID((HACMOBJ)1, 0, 0); ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(): rc = %08x, should be %08x\n", + "acmDriverID(): rc = %08x, should be %08x\n", rc, MMSYSERR_INVALHANDLE); /* try bad flag */
1
0
0
0
Alex Villacís Lasso : msacm: Fix acmMetrics(ACM_METRIC_DRIVER_PRIORITY) return on error.
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: 1da4b59e332771edf593c8056dfa55b3d64a9db1 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1da4b59e332771edf593c80…
Author: Alex Villacís Lasso <a_villacis(a)palosanto.com> Date: Tue Jan 17 15:59:59 2006 +0100 msacm: Fix acmMetrics(ACM_METRIC_DRIVER_PRIORITY) return on error. --- dlls/msacm/msacm32_main.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/msacm/msacm32_main.c b/dlls/msacm/msacm32_main.c index e0a1f44..7d8f9af 100644 --- a/dlls/msacm/msacm32_main.c +++ b/dlls/msacm/msacm32_main.c @@ -224,12 +224,15 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, case ACM_METRIC_DRIVER_PRIORITY: /* Return current list position of driver */ if (!hao) return MMSYSERR_INVALHANDLE; - if (!pMetric) return MMSYSERR_INVALPARAM; mmr = MMSYSERR_INVALHANDLE; for (i = 1, padid = MSACM_pFirstACMDriverID; padid; i++, padid = padid->pNextACMDriverID) { if (padid == (PWINE_ACMDRIVERID)hao) { - *(LPDWORD)pMetric = i; - mmr = MMSYSERR_NOERROR; + if (pMetric) { + *(LPDWORD)pMetric = i; + mmr = MMSYSERR_NOERROR; + } else { + mmr = MMSYSERR_INVALPARAM; + } break; } }
1
0
0
0
Alex Villacís Lasso : msacm: Add support for ACM_METRIC_DRIVER_SUPPORT.
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: 9a577e5e41ed6fb4527776d2fb29bd21cada100e URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=9a577e5e41ed6fb4527776d…
Author: Alex Villacís Lasso <a_villacis(a)palosanto.com> Date: Tue Jan 17 15:59:02 2006 +0100 msacm: Add support for ACM_METRIC_DRIVER_SUPPORT. --- dlls/msacm/msacm32_main.c | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/dlls/msacm/msacm32_main.c b/dlls/msacm/msacm32_main.c index 379539e..e0a1f44 100644 --- a/dlls/msacm/msacm32_main.c +++ b/dlls/msacm/msacm32_main.c @@ -235,10 +235,26 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, } break; + case ACM_METRIC_DRIVER_SUPPORT: + /* Return fdwSupport for driver */ + if (!hao) return MMSYSERR_INVALHANDLE; + mmr = MMSYSERR_INVALHANDLE; + for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) { + if (padid == (PWINE_ACMDRIVERID)hao) { + if (pMetric) { + *(LPDWORD)pMetric = padid->fdwSupport; + mmr = MMSYSERR_NOERROR; + } else { + mmr = MMSYSERR_INVALPARAM; + } + break; + } + } + break; + case ACM_METRIC_HARDWARE_WAVE_INPUT: case ACM_METRIC_HARDWARE_WAVE_OUTPUT: case ACM_METRIC_MAX_SIZE_FILTER: - case ACM_METRIC_DRIVER_SUPPORT: default: FIXME("(%p, %d, %p): stub\n", hao, uMetric, pMetric); mmr = MMSYSERR_NOTSUPPORTED;
1
0
0
0
Michael Jung : shell32: Support for CLSID_ShellFSFolder in unixfs.
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: db7a3a352e9e50c946f2539370ef0f6910bc423c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=db7a3a352e9e50c946f2539…
Author: Michael Jung <mjung(a)iss.tu-darmstadt.de> Date: Tue Jan 17 15:58:52 2006 +0100 shell32: Support for CLSID_ShellFSFolder in unixfs. --- dlls/shell32/shell32_main.h | 1 + dlls/shell32/shfldr_unixfs.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index b51aef7..908ac28 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -96,6 +96,7 @@ HRESULT WINAPI UnixFolder_Constructor(IU HRESULT WINAPI UnixDosFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv); HRESULT WINAPI FolderShortcut_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv); HRESULT WINAPI MyDocuments_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv); +HRESULT WINAPI ShellFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv); extern HRESULT CPanel_GetIconLocationW(LPITEMIDLIST, LPWSTR, UINT, int*); HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index c898e67..417c55e 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -1494,13 +1494,21 @@ static HRESULT WINAPI UnixFolder_IPersis /* Find the UnixFolderClass root */ while (current->mkid.cb) { - if (_ILIsSpecialFolder(current) && IsEqualIID(This->m_pCLSID, _ILGetGUIDPointer(current))) + if ((_ILIsDrive(current) && IsEqualCLSID(This->m_pCLSID, &CLSID_ShellFSFolder)) || + (_ILIsSpecialFolder(current) && IsEqualCLSID(This->m_pCLSID, _ILGetGUIDPointer(current)))) + { break; + } current = ILGetNext(current); } if (current && current->mkid.cb) { - if (IsEqualIID(&CLSID_MyDocuments, _ILGetGUIDPointer(current))) { + if (_ILIsDrive(current)) { + WCHAR wszDrive[4] = { '?', ':', '\\', 0 }; + wszDrive[0] = (WCHAR)*_ILGetTextPointer(current); + if (!UNIXFS_get_unix_path(wszDrive, szBasePath)) + return E_FAIL; + } else if (IsEqualIID(&CLSID_MyDocuments, _ILGetGUIDPointer(current))) { WCHAR wszMyDocumentsPath[MAX_PATH]; if (!SHGetSpecialFolderPathW(0, wszMyDocumentsPath, CSIDL_PERSONAL, FALSE)) return E_FAIL; @@ -2122,6 +2130,11 @@ HRESULT WINAPI MyDocuments_Constructor(I return CreateUnixFolder(pUnkOuter, riid, ppv, &CLSID_MyDocuments); } +HRESULT WINAPI ShellFSFolder_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) { + TRACE("(pUnkOuter=%p, riid=%p, ppv=%p)\n", pUnkOuter, riid, ppv); + return CreateUnixFolder(pUnkOuter, riid, ppv, &CLSID_ShellFSFolder); +} + /****************************************************************************** * UnixSubFolderIterator *
1
0
0
0
Vitaly Budovski : d3d8: Render state additions.
by Alexandre Julliard
17 Jan '06
17 Jan '06
Module: wine Branch: refs/heads/master Commit: 624efed78e0ae83d19fd1c7210ddd0b5b30d129b URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=624efed78e0ae83d19fd1c7…
Author: Vitaly Budovski <vbudovsk(a)cs.rmit.edu.au> Date: Tue Jan 17 15:58:43 2006 +0100 d3d8: Render state additions. Implemented D3DRS_EDGEANTIALIAS. Implemented D3DRS_POINTSPRITEENABLE. Implemented D3DRS_MULTISAMPLEANTIALIAS. --- dlls/d3d8/device.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 77a59a9..363052d 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -3054,6 +3054,21 @@ HRESULT WINAPI IDirect3DDevice8Impl_Se /* Unhandled yet...! */ case D3DRS_EDGEANTIALIAS : + { + if(Value) { + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + checkGLcall("glEnable GL_BLEND"); + glEnable(GL_LINE_SMOOTH); + checkGLcall("glEnable Gl_LINE_SMOOTH"); + } else { + glDisable(GL_BLEND); + checkGLcall("glDisable GL_BLEND"); + glDisable(GL_LINE_SMOOTH); + checkGLcall("glDisable GL_LINE_SMOOTH"); + } + break; + } case D3DRS_WRAP0 : case D3DRS_WRAP1 : case D3DRS_WRAP2 : @@ -3062,8 +3077,48 @@ HRESULT WINAPI IDirect3DDevice8Impl_Se case D3DRS_WRAP5 : case D3DRS_WRAP6 : case D3DRS_WRAP7 : + { + FIXME("(%p)->(%d,%ld) not handled yet\n", This, State, Value); + break; + } case D3DRS_POINTSPRITEENABLE : + { + if(Value) { + if(GL_SUPPORT(GL_ARB_point_sprite)) { + glEnable(GL_POINT_SPRITE_ARB); + checkGLcall("glEnable GL_POINT_SPRITE_ARB"); + } else { + TRACE("Point sprites cannot be enabled in this version of opengl\n"); + } + } else { + if(GL_SUPPORT(GL_ARB_point_sprite)) { + glDisable(GL_POINT_SPRITE_ARB); + checkGLcall("glDisable GL_POINT_SPRITE_ARB"); + } else { + TRACE("Point sprites cannot be disabled in this version of opengl\n"); + } + } + break; + } case D3DRS_MULTISAMPLEANTIALIAS : + { + if(Value) { + if(GL_SUPPORT(GL_ARB_multisample)) { + glEnable(GL_MULTISAMPLE_ARB); + checkGLcall("glEnable GL_MULTISAMPLE_ARB"); + } else { + TRACE("Multisample antialiasing cannot be enabled in this version of opengl\n"); + } + } else { + if(GL_SUPPORT(GL_ARB_multisample)) { + glDisable(GL_MULTISAMPLE_ARB); + checkGLcall("glDisable GL_MULTISAMPLE_ARB"); + } else { + TRACE("Multisample antialiasing cannot be disabled in this version of opengl\n"); + } + } + break; + } case D3DRS_MULTISAMPLEMASK : case D3DRS_PATCHEDGESTYLE : case D3DRS_PATCHSEGMENTS :
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
62
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
Results per page:
10
25
50
100
200