comctl32 toolbar - Improve fixme message conditions

Jason Edmeades jason.edmeades at googlemail.com
Mon Dec 21 14:24:16 CST 2009


Silence a fixme for the scenario where the code will work correctly as
it is being issued in error

This fixme is only a problem if the hInst points to a different module
and hence 0 or the current module should work just fine. The +toolbar
trace shows:

trace:toolbar:TOOLBAR_ReplaceBitmap hInstOld 0x3c0000 nIDOld 20
hInstNew 0x3c0000 nIDNew 1f nButtons 1
fixme:toolbar:TOOLBAR_ReplaceBitmap resources not in the current
module not implemented

Jason
-------------- next part --------------
From ed9308808974103419bdc0638048746e3ea5dadb Mon Sep 17 00:00:00 2001
From: Jason Edmeades <jason.edmeades at googlemail.com>
Date: Mon, 21 Dec 2009 09:42:38 +0000
Subject: comctl32 toolbar - Improve fixme message conditions

This fixme is only a problem if the hInst points to a different module and hence 0
or the current module should work just fine. The +toolbar trace shows:

trace:toolbar:TOOLBAR_ReplaceBitmap hInstOld 0x3c0000 nIDOld 20 hInstNew 0x3c0000 nIDNew 1f nButtons 1
fixme:toolbar:TOOLBAR_ReplaceBitmap resources not in the current module not implemented

Silence the fixme under those conditions.
---
 dlls/comctl32/toolbar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 9481840..d10efc6 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -3991,7 +3991,7 @@ TOOLBAR_ReplaceBitmap (TOOLBAR_INFO *infoPtr, const TBREPLACEBITMAP *lpReplace)
         FIXME("changing standard bitmaps not implemented\n");
         return FALSE;
     }
-    else if (lpReplace->hInstOld != 0)
+    else if (lpReplace->hInstOld != 0 && lpReplace->hInstOld != lpReplace->hInstNew)
         FIXME("resources not in the current module not implemented\n");
 
     TRACE("To be replaced hInstOld %p nIDOld %lx\n", lpReplace->hInstOld, lpReplace->nIDOld);
-- 
1.6.3.3

=


More information about the wine-patches mailing list