ReactOS  0.4.15-dev-1201-gb2cf5a4
desktopbar.h
Go to the documentation of this file.
1 /*
2  * Copyright 2003, 2004 Martin Fuchs
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 
20  //
21  // Explorer and Desktop clone
22  //
23  // desktopbar.h
24  //
25  // Martin Fuchs, 22.08.2003
26  //
27 
28 
29 #define CLASSNAME_EXPLORERBAR TEXT("Shell_TrayWnd")
30 #define TITLE_EXPLORERBAR TEXT("") // use an empty window title, so windows taskmanager does not show the window in its application list
31 
32 
33 #define DESKTOPBARBAR_HEIGHT (GetSystemMetrics(SM_CYSIZE) + 5 * GetSystemMetrics(SM_CYEDGE))
34 #define REBARBAND_HEIGHT (GetSystemMetrics(SM_CYSIZE) + 2 * GetSystemMetrics(SM_CYEDGE))
35 
36 
37 #define IDC_START 0x1000
38 #define IDC_LOGOFF 0x1001
39 #define IDC_SHUTDOWN 0x1002
40 #define IDC_LAUNCH 0x1003
41 #define IDC_START_HELP 0x1004
42 #define IDC_SEARCH_FILES 0x1005
43 #define IDC_SEARCH_COMPUTER 0x1006
44 #define IDC_SETTINGS 0x1007
45 #define IDC_ADMIN 0x1008
46 #define IDC_DOCUMENTS 0x1009
47 #define IDC_RECENT 0x100A
48 #define IDC_FAVORITES 0x100B
49 #define IDC_PROGRAMS 0x100C
50 #define IDC_EXPLORE 0x100D
51 #define IDC_NETWORK 0x100E
52 #define IDC_CONNECTIONS 0x100F
53 #define IDC_DRIVES 0x1010
54 #define IDC_CONTROL_PANEL 0x1011
55 #define IDC_SETTINGS_MENU 0x1012
56 #define IDC_PRINTERS 0x1013
57 #define IDC_PRINTERS_MENU 0x1014
58 #define IDC_BROWSE 0x1015
59 #define IDC_SEARCH_PROGRAM 0x1016
60 #define IDC_SEARCH 0x1017
61 #define IDC_TERMINATE 0x1018
62 #define IDC_RESTART 0x1019
63 
64 #define IDC_FIRST_MENU 0x3000
65 
66 // hotkeys
67 #define IDHK_EXPLORER 0
68 #define IDHK_RUN 1
69 #define IDHK_DESKTOP 2
70 #define IDHK_LOGOFF 3
71 #define IDHK_STARTMENU 4
72 
74 struct DesktopBar : public
75 #ifdef __REACTOS__
77  OwnerDrawParent<Window> >
78 #else
79  OwnerDrawParent<Window>
80 #endif
81 {
82 #ifdef __REACTOS__
85 #else
87 #endif
88 
90  ~DesktopBar();
91 
92  static HWND Create();
93 
94 protected:
97 
100  int Notify(int id, NMHDR* pnmh);
101  int Command(int id, int code);
102 
103  void Resize(int cx, int cy);
105  void RegisterHotkeys();
106  void ProcessHotKey(int id_hotkey);
107  void ShowOrHideStartMenu();
109 
110  WindowHandle _hwndTaskBar;
111  WindowHandle _hwndNotify;
112  WindowHandle _hwndQuickLaunch;
113  WindowHandle _hwndrebar;
114  /* Needed to make the StartButton pushed, if it's called by windowskey: SC_TASKLIST command */
115  WindowHandle _hwndStartButton;
116 
118 
119 #ifdef __REACTOS__
120  TrayIcon _trayIcon;
121 
122  void AddTrayIcons();
123  virtual void TrayClick(UINT id, int btn);
124  virtual void TrayDblClick(UINT id, int btn);
125 #else
127 #endif
128 };
129 
130 
132 struct StartButton : public PictureButton
133 {
135 
137 
138 protected:
140 };
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
WindowHandle _hwndStartButton
Definition: desktopbar.h:115
WindowHandle _hwndrebar
Definition: desktopbar.h:113
void ProcessHotKey(int id_hotkey)
Definition: desktopbar.cpp:250
static HWND Create()
Definition: desktopbar.cpp:64
void RegisterHotkeys()
Definition: desktopbar.cpp:238
draw message routing for ColorButton and PictureButton
Definition: window.h:624
UINT_PTR WPARAM
Definition: windef.h:207
int Notify(int id, NMHDR *pnmh)
Definition: desktopbar.cpp:377
void ShowOrHideStartMenu()
Definition: desktopbar.cpp:486
struct StartMenuRoot * _startMenuRoot
Definition: desktopbar.h:117
WindowHandle _hwndQuickLaunch
Definition: desktopbar.h:112
special "Start" button with one click activation
Definition: desktopbar.h:132
OwnerDrawParent< Window > super
Definition: desktopbar.h:86
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
WindowHandle _hwndTaskBar
Definition: desktopbar.h:110
LONG_PTR LPARAM
Definition: windef.h:208
DesktopBar(HWND hwnd)
Definition: desktopbar.cpp:40
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: desktopbar.cpp:277
WindowHandle _hwndNotify
Definition: desktopbar.h:111
void Resize(int cx, int cy)
Definition: desktopbar.cpp:396
Definition: inflate.c:139
int Command(int id, int code)
Definition: desktopbar.cpp:426
LRESULT ProcessCopyData(COPYDATASTRUCT *pcd)
Definition: desktopbar.cpp:512
desktop bar window, also known as "system tray"
Definition: desktopbar.h:74
int _taskbar_pos
Definition: desktopbar.h:96
void ControlResize(WPARAM wparam, LPARAM lparam)
Definition: desktopbar.cpp:528
unsigned int UINT
Definition: ndis.h:50
RECT _work_area_org
Definition: desktopbar.h:95
_Out_opt_ int * cx
Definition: commctrl.h:581
PictureButton super
Definition: desktopbar.h:134
const UINT WM_TASKBARCREATED
Definition: desktopbar.h:126
LONG_PTR LRESULT
Definition: windef.h:209
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: desktopbar.cpp:178
LRESULT Init(LPCREATESTRUCT pcs)
Definition: desktopbar.cpp:86
StartButton(HWND hwnd)
Definition: desktopbar.cpp:173
static UINT WPARAM wparam
Definition: combo.c:716
Startmenu root window.
Definition: startmenu.h:364