Author: weiden Date: Mon Jun 9 21:58:13 2008 New Revision: 33914
URL: http://svn.reactos.org/svn/reactos?rev=33914&view=rev Log: - Don't lookup DrawCaptionTempA/W by ordinal but rather by name - Various minor fixes
Modified: trunk/reactos/base/shell/explorer-new/precomp.h trunk/reactos/base/shell/explorer-new/taskswnd.c trunk/reactos/base/shell/explorer-new/tbsite.c trunk/reactos/base/shell/explorer-new/traywnd.c
Modified: trunk/reactos/base/shell/explorer-new/precomp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/pre... ============================================================================== --- trunk/reactos/base/shell/explorer-new/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/precomp.h [iso-8859-1] Mon Jun 9 21:58:13 2008 @@ -26,7 +26,13 @@
/* dynamic imports due to lack of support in msvc linker libs */ typedef INT (STDCALL *REGSHELLHOOK)(HWND, DWORD); +#ifdef UNICODE +#define PROC_NAME_DRAWCAPTIONTEMP "DrawCaptionTempW" typedef BOOL (STDCALL *DRAWCAPTEMP)(HWND, HDC, const RECT*, HFONT, HICON, LPCWSTR, UINT); +#else +#define PROC_NAME_DRAWCAPTIONTEMP "DrawCaptionTempA" +typedef BOOL (STDCALL *DRAWCAPTEMP)(HWND, HDC, const RECT*, HFONT, HICON, LPCSTR, UINT); +#endif typedef HRESULT (STDCALL *SHINVDEFCMD)(HWND, IShellFolder*, LPCITEMIDLIST);
static ULONG __inline
Modified: trunk/reactos/base/shell/explorer-new/taskswnd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/tas... ============================================================================== --- trunk/reactos/base/shell/explorer-new/taskswnd.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/taskswnd.c [iso-8859-1] Mon Jun 9 21:58:13 2008 @@ -26,7 +26,7 @@
/* Set DUMP_TASKS to 1 to enable a dump of the tasks and task groups every 5 seconds */ -#define DUMP_TASKS 1 +#define DUMP_TASKS 0
static const TCHAR szTaskSwitchWndClass[] = TEXT("MSTaskSwWClass"); static const TCHAR szRunningApps[] = TEXT("Running Applications"); @@ -1169,19 +1169,25 @@ static INT TaskSwitchWnd_UpdateTbButtonSpacing(IN OUT PTASK_SWITCH_WND This, IN BOOL bHorizontal, + IN UINT uiRows, IN UINT uiBtnsPerLine) { TBMETRICS tbm;
tbm.cbSize = sizeof(tbm); - tbm.dwMask = TBMF_BUTTONSPACING; + tbm.dwMask = TBMF_BARPAD | TBMF_BUTTONSPACING; + + tbm.cxBarPad = tbm.cyBarPad = 0;
if (bHorizontal || uiBtnsPerLine > 1) tbm.cxButtonSpacing = (3 * GetSystemMetrics(SM_CXEDGE) / 2); else tbm.cxButtonSpacing = 0;
- tbm.cyButtonSpacing = (3 * GetSystemMetrics(SM_CYEDGE) / 2); + if (!bHorizontal || uiRows > 1) + tbm.cyButtonSpacing = (3 * GetSystemMetrics(SM_CYEDGE) / 2); + else + tbm.cyButtonSpacing = 0;
SendMessage(This->hWndToolbar, TB_SETMETRICS, @@ -1209,8 +1215,9 @@ { if (This->ToolbarBtnCount > 0) { + ZeroMemory (&tbm, sizeof (tbm)); tbm.cbSize = sizeof(tbm); - tbm.dwMask = TBMF_PAD | TBMF_BUTTONSPACING; + tbm.dwMask = TBMF_BUTTONSPACING; SendMessage(This->hWndToolbar, TB_GETMETRICS, 0, @@ -1230,6 +1237,7 @@ /* We might need to update the button spacing */ tbm.cxButtonSpacing = TaskSwitchWnd_UpdateTbButtonSpacing(This, Horizontal, + uiRows, uiBtnsPerLine);
/* Calculate the ideal width and make sure it's within the allowed range */ @@ -1410,7 +1418,7 @@ BtnSize.cy));
/* We don't want to see partially clipped buttons...not that we could see them... */ -#if 1 +#if 0 SendMessage(This->hWndToolbar, TB_SETEXTENDEDSTYLE, 0, @@ -1420,6 +1428,7 @@ /* Set proper spacing between buttons */ TaskSwitchWnd_UpdateTbButtonSpacing(This, ITrayWindow_IsHorizontal(This->Tray), + 0, 0);
/* Register the shell hook */ @@ -1899,6 +1908,7 @@ /* Update the button spacing */ TaskSwitchWnd_UpdateTbButtonSpacing(This, ITrayWindow_IsHorizontal(This->Tray), + 0, 0); break; } @@ -2026,6 +2036,13 @@ break; } } + else + { + Ret = DefWindowProc(hwnd, + uMsg, + wParam, + lParam); + }
return Ret; }
Modified: trunk/reactos/base/shell/explorer-new/tbsite.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/tbs... ============================================================================== --- trunk/reactos/base/shell/explorer-new/tbsite.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/tbsite.c [iso-8859-1] Mon Jun 9 21:58:13 2008 @@ -332,7 +332,8 @@ { LPNMMOUSE nmm = (LPNMMOUSE)lParam;
- if (nmm->dwHitInfo == RBHT_CLIENT || nmm->dwItemSpec == (DWORD_PTR)-1) + if (nmm->dwHitInfo == RBHT_CLIENT || nmm->dwHitInfo == RBHT_NOWHERE || + nmm->dwItemSpec == (DWORD_PTR)-1) { /* Make the rebar control appear transparent so the user can drag the tray window */
Modified: trunk/reactos/base/shell/explorer-new/traywnd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/tra... ============================================================================== --- trunk/reactos/base/shell/explorer-new/traywnd.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/traywnd.c [iso-8859-1] Mon Jun 9 21:58:13 2008 @@ -1294,17 +1294,14 @@ if (hIconStart != NULL) Flags |= DC_ICON;
- hUser32 = LoadLibrary(TEXT("USER32.DLL")); + hUser32 = GetModuleHandle(TEXT("USER32.DLL")); if (hUser32 != NULL) { DRAWCAPTEMP DrawCapTemp; - LONG ord = 187; -#ifndef UNICODE - ord = 186; -#endif + /* DrawCaptionTemp */ DrawCapTemp = (DRAWCAPTEMP)GetProcAddress(hUser32, - (LPCSTR)ord); + PROC_NAME_DRAWCAPTIONTEMP); if (DrawCapTemp != NULL) { Ret = DrawCapTemp(NULL, @@ -1315,8 +1312,6 @@ szStartCaption, Flags); } - - FreeLibrary(hUser32); }
SelectObject(hDC, @@ -1761,7 +1756,7 @@ bLock))) { /* Reset?? */ - This->Locked = bLock; + This->Locked = bPrevLock; } } }