Alex Henrie : user32: Load hIconSmIntern from the best-matching resource.

Alexandre Julliard julliard at wine.codeweavers.com
Wed May 13 10:25:31 CDT 2015


Module: wine
Branch: master
Commit: f920dfd6984ca9227900d0f0406afb3ceb892cc5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f920dfd6984ca9227900d0f0406afb3ceb892cc5

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Wed May 13 00:33:13 2015 -0600

user32: Load hIconSmIntern from the best-matching resource.

---

 dlls/user32/class.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/user32/class.c b/dlls/user32/class.c
index 531c2e3..2c94367 100644
--- a/dlls/user32/class.c
+++ b/dlls/user32/class.c
@@ -599,7 +599,8 @@ ATOM WINAPI RegisterClassExA( const WNDCLASSEXA* wc )
     classPtr->hIconSmIntern = wc->hIcon && !wc->hIconSm ?
                                             CopyImage( wc->hIcon, IMAGE_ICON,
                                                 GetSystemMetrics( SM_CXSMICON ),
-                                                GetSystemMetrics( SM_CYSMICON ), 0 ) : NULL;
+                                                GetSystemMetrics( SM_CYSMICON ),
+                                                LR_COPYFROMRESOURCE ) : NULL;
     classPtr->hCursor       = wc->hCursor;
     classPtr->hbrBackground = wc->hbrBackground;
     classPtr->winproc       = WINPROC_AllocProc( wc->lpfnWndProc, FALSE );
@@ -643,7 +644,8 @@ ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc )
     classPtr->hIconSmIntern = wc->hIcon && !wc->hIconSm ?
                                             CopyImage( wc->hIcon, IMAGE_ICON,
                                                 GetSystemMetrics( SM_CXSMICON ),
-                                                GetSystemMetrics( SM_CYSMICON ), 0 ) : NULL;
+                                                GetSystemMetrics( SM_CYSMICON ),
+                                                LR_COPYFROMRESOURCE ) : NULL;
     classPtr->hCursor       = wc->hCursor;
     classPtr->hbrBackground = wc->hbrBackground;
     classPtr->winproc       = WINPROC_AllocProc( wc->lpfnWndProc, TRUE );
@@ -981,7 +983,8 @@ static ULONG_PTR CLASS_SetClassLong( HWND hwnd, INT offset, LONG_PTR newval,
         }
         if (newval && !class->hIconSm)
             class->hIconSmIntern = CopyImage( (HICON)newval, IMAGE_ICON,
-                      GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), 0 );
+                      GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ),
+                      LR_COPYFROMRESOURCE );
         class->hIcon = (HICON)newval;
         break;
     case GCLP_HICONSM:
@@ -989,7 +992,8 @@ static ULONG_PTR CLASS_SetClassLong( HWND hwnd, INT offset, LONG_PTR newval,
         if (retval && !newval)
             class->hIconSmIntern = class->hIcon ? CopyImage( class->hIcon, IMAGE_ICON,
                                                 GetSystemMetrics( SM_CXSMICON ),
-                                                GetSystemMetrics( SM_CYSMICON ), 0 ) : NULL;
+                                                GetSystemMetrics( SM_CYSMICON ),
+                                                LR_COPYFROMRESOURCE ) : NULL;
         else if (!retval && newval && class->hIconSmIntern)
         {
             DestroyIcon(class->hIconSmIntern);




More information about the wine-cvs mailing list