Ecco il link di explorer precompilato:
Lean-Explorer.rar
I sorgenti con soluzione CodeBlocks + Modifiche:
LeanExplorer-Src.rar
Le modifiche che ho fatto sono le seguenti (molto semplici

)
N.B: C'è un noiosissimo bug, che se si clicca qualunque icona nel desktop, la shell crasha,
Il bug sta quì, file: shellfs.cpp
Code: Select all
ShellPath ShellEntry::create_absolute_pidl() const
{
CONTEXT("ShellEntry::create_absolute_pidl()");
if (_up) // <== CRASH!!! _up non è NULL
{
ShellDirectory* dir = _up;
if (dir->_pidl->mkid.cb) // Caching of absolute PIDLs could enhance performance.
return _pidl.create_absolute_pidl(dir->create_absolute_pidl());
}
return _pidl;
}
In desktopbar.h che si occupa di tutta la parte di sotto della shell (start, taskbar, traybar, etc) ho semplicemente cambiato la costante dell'altezza
Code: Select all
#define DESKTOPBARBAR_HEIGHT 43
/* Prima Era
* #define DESKTOPBARBAR_HEIGHT 29
*/
In taskbar.cpp, che è la parte che si occupa di far apparire i programmi aperti ho eliminato la parte che si occupava di scrivere il testo e ridimensionare i pulsanti sulla base di esso, quindi:
In ResizeButtons() è rimasto questo:
Code: Select all
void TaskBar::ResizeButtons()
{
int btns = _map.size();
if (btns > 0)
{
SendMessage(_htoolbar, TB_SETBUTTONSIZE, 0, MAKELONG(TASKBUTTONWIDTH_MAX, 40));
SendMessage(_htoolbar, TB_AUTOSIZE, 0, 0);
}
}
E nella callback EnumWndProc è rimasta solo la parte che disegna il pulsante più l'icona (quest'ultima ancora da centrare sul pulsante)
Code: Select all
BOOL CALLBACK TaskBar::EnumWndProc(HWND hwnd, LPARAM lparam)
{
TaskBar* pThis = (TaskBar*)lparam;
DWORD style = GetWindowStyle(hwnd);
DWORD ex_style = GetWindowExStyle(hwnd);
if ((style&WS_VISIBLE) && !(ex_style&WS_EX_TOOLWINDOW) &&
!GetParent(hwnd) && !GetWindow(hwnd,GW_OWNER))
{
TaskBarMap::iterator found = pThis->_map.find(hwnd);
int last_id = 0;
if (found != pThis->_map.end()) {
last_id = found->second._id;
if (!last_id)
found->second._id = pThis->_next_id++;
} else {
HBITMAP hbmp;
HICON hIcon = get_window_icon(hwnd);
if (hIcon) {
hbmp = create_bitmap_from_icon(hIcon, GetSysColorBrush(COLOR_BTNFACE), WindowCanvas(pThis->_htoolbar));
DestroyIcon(hIcon); // some icons can be freed, some not - so ignore any error return of DestroyIcon()
} else
hbmp = 0;
TBADDBITMAP ab = {0, (UINT_PTR)hbmp};
int bmp_idx = SendMessage(pThis->_htoolbar, TB_ADDBITMAP, 1, (LPARAM)&ab);
TaskBarEntry entry;
entry._id = pThis->_next_id++;
entry._hbmp = hbmp;
entry._bmp_idx = bmp_idx;
pThis->_map[hwnd] = entry;
found = pThis->_map.find(hwnd);
}
TBBUTTON btn = {-2/*I_IMAGENONE*/, 0, TBSTATE_ENABLED/*|TBSTATE_ELLIPSES*/, BTNS_BUTTON, {0, 0}, 0, 0};
TaskBarEntry& entry = found->second;
++entry._used;
btn.idCommand = entry._id;
HWND foreground = GetForegroundWindow();
HWND foreground_owner = GetWindow(foreground, GW_OWNER);
if (hwnd==foreground || hwnd==foreground_owner)
{
btn.fsState |= TBSTATE_PRESSED|TBSTATE_CHECKED;
pThis->_last_foreground_wnd = hwnd;
}
if (!last_id) {
// create new toolbar buttons for new windows
btn.iBitmap = entry._bmp_idx;
entry._btn_idx = SendMessage(pThis->_htoolbar, TB_BUTTONCOUNT, 0, 0);
SendMessage(pThis->_htoolbar, TB_INSERTBUTTON, entry._btn_idx, (LPARAM)&btn);
pThis->ResizeButtons();
} else {
// refresh attributes of existing buttons
if (btn.fsState != entry._fsState)
SendMessage(pThis->_htoolbar, TB_SETSTATE, entry._id, MAKELONG(btn.fsState,0));
}
entry._fsState = btn.fsState;
// move minimized windows out of sight
if (IsIconic(hwnd)) {
RECT rect;
GetWindowRect(hwnd, &rect);
if (rect.bottom > 0)
SetWindowPos(hwnd, 0, -32000, -32000, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
}
}
return TRUE;
}
Per il numero di desktop multipli basta lavorare sulla costante DESKTOP_COUNT in globals.h.
Per la scritta del menu start, credo si possa eliminare in desktopbar.h, nella funzione Init(), disegna tutto lì, avvio rapido, menu start, taskbar, traybar, etc etc:
Code: Select all
LRESULT DesktopBar::Init(LPCREATESTRUCT pcs)
{
// create start button
ResString start_str(IDS_START);
WindowCanvas canvas(_hwnd);
RECT rect = {0, 0, 0, 0};
/* Questo pezzo quì??? */
DrawText(canvas, start_str, -1, &rect, DT_SINGLELINE|DT_CALCRECT);
/* Questo pezzo quì??? */
int start_btn_width = rect.right+16+8;
...
...
Per i desktop multipli, secondo me sono utili, non 4, ma 2 (Vabbè lo confesso, sono di parte, a me piacciono da matti

)
Di Explorer_New, non c'è neanche uno screen, sull'aspetto che dovrebbe avere??? Io non lo mai visto
