/* * Copyright 2003, 2004 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // // Explorer and Desktop clone, lean version // // desktopbar.h // // Martin Fuchs, 22.08.2003 // #define CLASSNAME_EXPLORERBAR TEXT("Shell_TrayWnd") #define TITLE_EXPLORERBAR TEXT("") // use an empty window title, so windows taskmanager does not show the window in its application list #define WINMSG_TASKBARCREATED TEXT("TaskbarCreated") #define DESKTOPBARBAR_HEIGHT 29 #define IDC_START 0x1000 #define IDC_LOGOFF 0x1001 #define IDC_SHUTDOWN 0x1002 #define IDC_LAUNCH 0x1003 #define IDC_START_HELP 0x1004 #define IDC_SEARCH_FILES 0x1005 #define IDC_SEARCH_COMPUTER 0x1006 #define IDC_SETTINGS 0x1007 #define IDC_ADMIN 0x1008 #define IDC_DOCUMENTS 0x1009 #define IDC_RECENT 0x100A #define IDC_FAVORITES 0x100B #define IDC_PROGRAMS 0x100C #define IDC_EXPLORE 0x100D #define IDC_CONNECTIONS 0x100F #define IDC_CONTROL_PANEL 0x1012 #define IDC_PRINTERS 0x1013 #define IDC_SEARCH 0x1016 #define IDC_TERMINATE 0x1017 #define IDC_FIRST_MENU 0x3000 /// desktop bar window, also known as "system tray" struct DesktopBar : public OwnerDrawParent { typedef OwnerDrawParent super; DesktopBar(HWND hwnd); ~DesktopBar(); static HWND Create(); protected: CommonControlInit _usingCmnCtrl; int WM_TASKBARCREATED; RECT _work_area_org; int _taskbar_pos; LRESULT Init(LPCREATESTRUCT pcs); LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); int Command(int id, int code); void Resize(int cx, int cy); void RegisterHotkeys(); void ProcessHotKey(int id_hotkey); void ShowStartMenu(); LRESULT ProcessCopyData(COPYDATASTRUCT* pcd); WindowHandle _hwndTaskBar; WindowHandle _hwndNotify; WindowHandle _hwndQuickLaunch; struct StartMenuRoot* _startMenuRoot; };