[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()
{
int i;
TRACE("destroying %p\n", this);
if (fRebarWindow != NULL)
{
DestroyWindow(fRebarWindow);
@ -259,6 +258,7 @@ CBandSiteBase::~CBandSiteBase()
if (fBands != NULL)
{
int i;
for (i = 0; i < fBandsAllocated; i++)
{
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)
{
POINT newLocation;
int delta;
//int delta;
if (fTracking)
{
newLocation.x = (short)LOWORD(lParam);
newLocation.y = (short)HIWORD(lParam);
#if 0
if (fVertical)
delta = newLocation.x - fLastLocation.x;
else
delta = newLocation.y - fLastLocation.y;
#endif
fLastLocation = newLocation;
}
return 0;

View file

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

View file

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