* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <precomp.h>
+#include "precomp.h"
HINSTANCE hExplorerInstance;
HMODULE hUser32;
return bRet;
}
+static VOID
+HideMinimizedWindows(IN BOOL bHide)
+{
+ MINIMIZEDMETRICS mm;
+
+ mm.cbSize = sizeof(mm);
+ if (!SystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(mm), &mm, 0))
+ {
+ DbgPrint("SystemParametersInfo failed with %lu\n", GetLastError());
+ return;
+ }
+ if (bHide)
+ mm.iArrange |= ARW_HIDE;
+ else
+ mm.iArrange &= ~ARW_HIDE;
+ if (!SystemParametersInfo(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0))
+ DbgPrint("SystemParametersInfo failed with %lu\n", GetLastError());
+}
+
INT WINAPI
_tWinMain(IN HINSTANCE hInstance,
IN HINSTANCE hPrevInstance,
InitCommonControls();
OleInitialize(NULL);
+ ProcessStartupItems();
+
if (GetShellWindow() == NULL)
CreateShellDesktop = TRUE;
if (RegisterTrayWindowClass() && RegisterTaskSwitchWndClass())
{
Tray = CreateTrayWindow();
+ /* This not only hides the minimized window captions in the bottom
+ left screen corner, but is also needed in order to receive
+ HSHELL_* notification messages (which are required for taskbar
+ buttons to work right) */
+ HideMinimizedWindows(TRUE);
if (Tray != NULL)
hShellDesktop = DesktopCreateWindow(Tray);
if (Tray != NULL)
{
+ RegisterHotKey(NULL, IDHK_RUN, MOD_WIN, 'R');
TrayMessageLoop(Tray);
+ HideMinimizedWindows(FALSE);
ITrayWindow_Release(Tray);
UnregisterTrayWindowClass();
}