code beautification

svn path=/trunk/; revision=39088
This commit is contained in:
Martin Fuchs 2009-01-25 11:54:31 +00:00
parent bcd29bbeab
commit 5219191647
3 changed files with 7 additions and 4 deletions

View file

@ -170,7 +170,7 @@ LRESULT DesktopBar::Init(LPCREATESTRUCT pcs)
// prepare Startmenu, but hide it for now
_startMenuRoot = GET_WINDOW(StartMenuRoot, StartMenuRoot::Create(_hwndStartButton, STARTMENUROOT_ICON_SIZE));
_startMenuRoot->_hwndParent = _hwndStartButton;
_startMenuRoot->_hwndStartButton = _hwndStartButton;
return 0;
}

View file

@ -1557,7 +1557,8 @@ void StartMenuButton::DrawItem(LPDRAWITEMSTRUCT dis)
StartMenuRoot::StartMenuRoot(HWND hwnd, const StartMenuRootCreateInfo& info)
: super(hwnd, info._icon_size)
: super(hwnd, info._icon_size),
_hwndStartButton(0)
{
#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003)
if (!g_Globals._SHRestricted || !SHRestricted(REST_NOCOMMONGROUPS))
@ -1637,7 +1638,7 @@ void StartMenuRoot::TrackStartmenu()
// recalculate start menu root position
RECT rect;
CalculateStartPos(_hwndParent, rect, _icon_size);
CalculateStartPos(_hwndStartButton, rect, _icon_size);
SetWindowPos(hwnd, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, 0);

View file

@ -366,10 +366,12 @@ struct StartMenuRoot : public StartMenuHandler
typedef StartMenuHandler super;
StartMenuRoot(HWND hwnd, const StartMenuRootCreateInfo& info);
HWND _hwndParent;
static HWND Create(HWND hwndDesktopBar, int icon_size);
void TrackStartmenu();
HWND _hwndStartButton;
protected:
LRESULT Init(LPCREATESTRUCT pcs);
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);