[BROWSEUI]

* Reduce the scope of a variable.
* Comment out some unused code.
* Initialize some member variables in the respective constructors.

svn path=/trunk/; revision=53944
This commit is contained in:
Amine Khaldi 2011-10-02 21:44:24 +00:00
parent e69656b340
commit 9513c1d1ea
4 changed files with 9 additions and 6 deletions

View file

@ -247,10 +247,9 @@ struct CBandSiteBase::BandObject *CBandSiteBase::GetBandFromHwnd(HWND hwnd)
CBandSiteBase::~CBandSiteBase() CBandSiteBase::~CBandSiteBase()
{ {
int i;
TRACE("destroying %p\n", this); TRACE("destroying %p\n", this);
if (fRebarWindow != NULL) if (fRebarWindow != NULL)
{ {
DestroyWindow(fRebarWindow); DestroyWindow(fRebarWindow);
@ -259,6 +258,7 @@ CBandSiteBase::~CBandSiteBase()
if (fBands != NULL) if (fBands != NULL)
{ {
int i;
for (i = 0; i < fBandsAllocated; i++) for (i = 0; i < fBandsAllocated; i++)
{ {
if (fBands[i].DeskBand != NULL) if (fBands[i].DeskBand != NULL)

View file

@ -491,18 +491,19 @@ LRESULT CBaseBar::OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHa
LRESULT CBaseBar::OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) LRESULT CBaseBar::OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
{ {
POINT newLocation; POINT newLocation;
int delta; //int delta;
if (fTracking) if (fTracking)
{ {
newLocation.x = (short)LOWORD(lParam); newLocation.x = (short)LOWORD(lParam);
newLocation.y = (short)HIWORD(lParam); newLocation.y = (short)HIWORD(lParam);
#if 0
if (fVertical) if (fVertical)
delta = newLocation.x - fLastLocation.x; delta = newLocation.x - fLastLocation.x;
else else
delta = newLocation.y - fLastLocation.y; delta = newLocation.y - fLastLocation.y;
#endif
fLastLocation = newLocation; fLastLocation = newLocation;
} }
return 0; return 0;

View file

@ -66,6 +66,7 @@ CBrandBand::CBrandBand()
fCurrentFrame = 0; fCurrentFrame = 0;
fMaxFrameCount = 0; fMaxFrameCount = 0;
fImageBitmap = NULL; fImageBitmap = NULL;
fBitmapSize = 0;
fAdviseCookie = 0; fAdviseCookie = 0;
} }

View file

@ -135,6 +135,8 @@ CDockSite::CDockSite()
fToolbar = NULL; fToolbar = NULL;
fRebarWindow = NULL; fRebarWindow = NULL;
fChildWindow = NULL; fChildWindow = NULL;
fBandID = 0;
fFlags = 0;
fInitialized = false; fInitialized = false;
memset(&fDeskBandInfo, 0, sizeof(fDeskBandInfo)); memset(&fDeskBandInfo, 0, sizeof(fDeskBandInfo));
} }
@ -150,7 +152,6 @@ HRESULT CDockSite::Initialize(IUnknown *containedBand, CInternetToolbar *browser
CComPtr<IDeskBand> deskBand; CComPtr<IDeskBand> deskBand;
TCHAR textBuffer[40]; TCHAR textBuffer[40];
REBARBANDINFOW bandInfo; REBARBANDINFOW bandInfo;
int bandCount;
HRESULT hResult; HRESULT hResult;
hResult = containedBand->QueryInterface(IID_IObjectWithSite, (void **)&site); hResult = containedBand->QueryInterface(IID_IObjectWithSite, (void **)&site);
@ -180,7 +181,7 @@ HRESULT CDockSite::Initialize(IUnknown *containedBand, CInternetToolbar *browser
bandInfo.cch = sizeof(textBuffer) / sizeof(TCHAR); bandInfo.cch = sizeof(textBuffer) / sizeof(TCHAR);
hResult = GetRBBandInfo(bandInfo); hResult = GetRBBandInfo(bandInfo);
bandCount = (int)SendMessage(fRebarWindow, RB_GETBANDCOUNT, 0, 0); SendMessage(fRebarWindow, RB_GETBANDCOUNT, 0, 0);
SendMessage(fRebarWindow, RB_INSERTBANDW, -1, (LPARAM)&bandInfo); SendMessage(fRebarWindow, RB_INSERTBANDW, -1, (LPARAM)&bandInfo);
fInitialized = true; fInitialized = true;
return S_OK; return S_OK;