ReactOS  0.4.13-dev-551-gf37fb1f
desktopbar.cpp
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 clone
22  //
23  // desktopbar.cpp
24  //
25  // Martin Fuchs, 22.08.2003
26  //
27 
28 
29 #include <precomp.h>
30 
31 #include "desktopbar.h"
32 #include "taskbar.h"
33 #include "startmenu.h"
34 #include "traynotify.h"
35 #include "quicklaunch.h"
36 
37 #include "../dialogs/settings.h"
38 
39 
41  : super(hwnd),
42 #ifdef __REACTOS__
43  _trayIcon(hwnd, ID_TRAY_VOLUME)
44 #else
46 #endif
47 {
49 
50  SystemParametersInfo(SPI_GETWORKAREA, 0, &_work_area_org, 0);
51 }
52 
54 {
55  // restore work area to the previous size
56  SystemParametersInfo(SPI_SETWORKAREA, 0, &_work_area_org, 0);
57  PostMessage(HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETWORKAREA, 0);
58 
59  // exit application after destroying desktop window
60  PostQuitMessage(0);
61 }
62 
63 
65 {
66  static BtnWindowClass wcDesktopBar(CLASSNAME_EXPLORERBAR);
67 
68  RECT rect;
69 
70  rect.left = -2; // hide left border
71 #ifdef TASKBAR_AT_TOP
72  rect.top = -2; // hide top border
73 #else
75 #endif
76  rect.right = GetSystemMetrics(SM_CXSCREEN) + 2;
77  rect.bottom = rect.top + DESKTOPBARBAR_HEIGHT + 2;
78 
80  wcDesktopBar, TITLE_EXPLORERBAR,
82  rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, 0);
83 }
84 
85 
87 {
88  if (super::Init(pcs))
89  return 1;
90 
91  // create start button
92  ResString start_str(IDS_START);
93  WindowCanvas canvas(_hwnd);
94  FontSelection font(canvas, GetStockFont(ANSI_VAR_FONT));
95  RECT rect = {0, 0};
96  DrawText(canvas, start_str, -1, &rect, DT_SINGLELINE|DT_CALCRECT);
97  int start_btn_width = rect.right+16+8;
98 
99  _taskbar_pos = start_btn_width + 6;
100 
101  // create "Start" button
102  HWND hwndStart = Button(_hwnd, start_str, 1, 1, start_btn_width, REBARBAND_HEIGHT, IDC_START, WS_VISIBLE|WS_CHILD|BS_OWNERDRAW);
104  new StartButton(hwndStart);
105 
106  /* Save the handle to the window, needed for push-state handling */
107  _hwndStartButton = hwndStart;
108 
109  // disable double clicks
110  SetClassLongPtr(hwndStart, GCL_STYLE, GetClassLongPtr(hwndStart, GCL_STYLE) & ~CS_DBLCLKS);
111 
112  // create task bar
113  _hwndTaskBar = TaskBar::Create(_hwnd);
114 
115  if (!g_Globals._SHRestricted || !SHRestricted(REST_NOTRAYITEMSDISPLAY))
116  // create tray notification area
118 
119 
120  // notify all top level windows about the successfully created desktop bar
121  //@@ Use SendMessage() instead of PostMessage() to avoid problems with delayed created shell service objects?
123 
124 
126 
127  // create rebar window to manage task and quick launch bar
128 #ifndef _NO_REBAR
131  RBS_VARHEIGHT|RBS_AUTOSIZE|RBS_DBLCLKTOGGLE| //|RBS_REGISTERDROP
133  0, 0, 0, 0, _hwnd, 0, g_Globals._hInstance, 0);
134 
135  REBARBANDINFO rbBand;
136 
137  rbBand.cbSize = sizeof(REBARBANDINFO);
139  rbBand.cyChild = REBARBAND_HEIGHT;
140  rbBand.cyMaxChild = (ULONG)-1;
141  rbBand.cyMinChild = REBARBAND_HEIGHT;
142  rbBand.cyIntegral = REBARBAND_HEIGHT + 3; //@@ OK?
144 
145  TCHAR QuickLaunchBand[] = _T("Quicklaunch");
146  rbBand.lpText = QuickLaunchBand;
147  rbBand.hwndChild = _hwndQuickLaunch;
148  rbBand.cx = 150;
149  rbBand.cxMinChild = 150;
150  rbBand.wID = IDW_QUICKLAUNCHBAR;
152 
153  TCHAR TaskbarBand[] = _T("Taskbar");
154  rbBand.lpText = TaskbarBand;
155  rbBand.hwndChild = _hwndTaskBar;
156  rbBand.cx = 200; //pcs->cx-_taskbar_pos-quicklaunch_width-(notifyarea_width+1);
157  rbBand.cxMinChild = 50;
158  rbBand.wID = IDW_TASKTOOLBAR;
160 #endif
161 
162 
163  RegisterHotkeys();
164 
165  // prepare Startmenu, but hide it for now
167  _startMenuRoot->_hwndStartButton = _hwndStartButton;
168 
169  return 0;
170 }
171 
172 
175 {
176 }
177 
179 {
180  switch(nmsg) {
181  // one click activation: handle button-down message, don't wait for button-up
182  case WM_LBUTTONDOWN:
183  if (!Button_GetState(_hwnd)) {
184  Button_SetState(_hwnd, TRUE);
185 
186  SetCapture(_hwnd);
187 
188  SendMessage(GetParent(_hwnd), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(_hwnd),0), 0);
189  }
190 
191  Button_SetState(_hwnd, FALSE);
192  break;
193 
194  // re-target mouse move messages while moving the mouse cursor through the start menu
195  case WM_MOUSEMOVE:
196  if (GetCapture() == _hwnd) {
198 
199  ClientToScreen(_hwnd, &pt);
201 
202  if (hwnd && hwnd!=_hwnd) {
205  }
206  }
207  break;
208 
209  case WM_LBUTTONUP:
210  if (GetCapture() == _hwnd) {
211  ReleaseCapture();
212 
214 
215  ClientToScreen(_hwnd, &pt);
217 
218  if (hwnd && hwnd!=_hwnd) {
222  }
223  }
224  break;
225 
226  case WM_CANCELMODE:
227  ReleaseCapture();
228  break;
229 
230  default:
231  return super::WndProc(nmsg, wparam, lparam);
232  }
233 
234  return 0;
235 }
236 
237 
239 {
240  // register hotkey WIN+E opening explorer
241  RegisterHotKey(_hwnd, IDHK_EXPLORER, MOD_WIN, 'E');
242  RegisterHotKey(_hwnd, IDHK_RUN, MOD_WIN, 'R');
243  RegisterHotKey(_hwnd, IDHK_DESKTOP, MOD_WIN, 'D');
244  RegisterHotKey(_hwnd, IDHK_LOGOFF, MOD_WIN, 'L');
246 
248 }
249 
250 void DesktopBar::ProcessHotKey(int id_hotkey)
251 {
252  switch(id_hotkey) {
253  case IDHK_EXPLORER:
255  break;
256 
257  case IDHK_RUN:
258  _startMenuRoot->Command(IDC_LAUNCH, 0);
259  break;
260 
261  case IDHK_LOGOFF:
262  _startMenuRoot->Command(IDC_LOGOFF, 0);
263  break;
264 
265  case IDHK_DESKTOP:
267  break;
268 
269  case IDHK_STARTMENU:
271  break;
273  }
274 }
275 
276 
278 {
279  switch(nmsg) {
280  case WM_NCHITTEST: {
282 
283  if (res>=HTSIZEFIRST && res<=HTSIZELAST) {
284 #ifdef TASKBAR_AT_TOP
285  if (res == HTBOTTOM) // enable vertical resizing at the lower border
286 #else
287  if (res == HTTOP) // enable vertical resizing at the upper border
288 #endif
289  return res;
290  else
291  return HTCLIENT; // disable any other resizing
292  }
293  return res;}
294 
295  case WM_SYSCOMMAND:
296  if ((wparam&0xFFF0) == SC_SIZE) {
297 #ifdef TASKBAR_AT_TOP
298  if (wparam == SC_SIZE+6)// enable vertical resizing at the lower border
299 #else
300  if (wparam == SC_SIZE+3)// enable vertical resizing at the upper border
301 #endif
302  goto def;
303  else
304  return 0; // disable any other resizing
305  } else if (wparam == SC_TASKLIST)
307  goto def;
308 
309  case WM_SIZE:
311  break;
312 
313  case WM_SIZING:
315  break;
316 
317  case PM_RESIZE_CHILDREN: {
318  ClientRect size(_hwnd);
319  Resize(size.right, size.bottom);
320  break;}
321 
322  case WM_CLOSE:
323  ShowExitWindowsDialog(_hwnd);
324  break;
325 
326  case WM_HOTKEY:
328  break;
329 
330  case WM_COPYDATA:
332 
333  case WM_CONTEXTMENU: {
334  POINTS p;
335  p.x = LOWORD(lparam);
336  p.y = HIWORD(lparam);
337  PopupMenu menu(IDM_DESKTOPBAR);
339  menu.TrackPopupMenu(_hwnd, p);
340  break;}
341 
342  case PM_GET_LAST_ACTIVE:
343  if (_hwndTaskBar)
344  return SendMessage(_hwndTaskBar, nmsg, wparam, lparam);
345  break;
346 
347  case PM_REFRESH_CONFIG:
349  break;
350 
351  case WM_TIMER:
352  if (wparam == ID_TRAY_VOLUME) {
353  KillTimer(_hwnd, wparam);
354  launch_file(_hwnd, TEXT("sndvol32.exe"), SW_SHOWNORMAL, TEXT("-t")); // launch volume control in small mode
355  }
356  break;
357 
358  case PM_GET_NOTIFYAREA:
359  return (LRESULT)(HWND)_hwndNotify;
360 
361  case WM_SYSCOLORCHANGE:
362  /* Forward WM_SYSCOLORCHANGE to common controls */
363 #ifndef _NO_REBAR
365 #endif
368  break;
369 
370  default: def:
371  return super::WndProc(nmsg, wparam, lparam);
372  }
373 
374  return 0;
375 }
376 
377 int DesktopBar::Notify(int id, NMHDR* pnmh)
378 {
379  if (pnmh->code == RBN_CHILDSIZE) {
380  /* align the task bands to the top, so it's in row with the Start button */
381  NMREBARCHILDSIZE* childSize = (NMREBARCHILDSIZE*)pnmh;
382 
383  if (childSize->wID == IDW_TASKTOOLBAR) {
384  int cy = childSize->rcChild.top - childSize->rcBand.top;
385 
386  if (cy) {
387  childSize->rcChild.bottom -= cy;
388  childSize->rcChild.top -= cy;
389  }
390  }
391  }
392 
393  return 0;
394 }
395 
396 void DesktopBar::Resize(int cx, int cy)
397 {
399  int quicklaunch_width = SendMessage(_hwndQuickLaunch, PM_GET_WIDTH, 0, 0);
400  int notifyarea_width = SendMessage(_hwndNotify, PM_GET_WIDTH, 0, 0);
401 
402  HDWP hdwp = BeginDeferWindowPos(3);
403 
404  if (_hwndrebar)
405  DeferWindowPos(hdwp, _hwndrebar, 0, _taskbar_pos, 1, cx-_taskbar_pos-(notifyarea_width+1), cy-2, SWP_NOZORDER|SWP_NOACTIVATE);
406  else {
407  if (_hwndQuickLaunch)
408  DeferWindowPos(hdwp, _hwndQuickLaunch, 0, _taskbar_pos, 1, quicklaunch_width, cy-2, SWP_NOZORDER|SWP_NOACTIVATE);
409 
410  if (_hwndTaskBar)
411  DeferWindowPos(hdwp, _hwndTaskBar, 0, _taskbar_pos+quicklaunch_width, 0, cx-_taskbar_pos-quicklaunch_width-(notifyarea_width+1), cy, SWP_NOZORDER|SWP_NOACTIVATE);
412  }
413 
414  if (_hwndNotify)
415  DeferWindowPos(hdwp, _hwndNotify, 0, cx-(notifyarea_width+1), 1, notifyarea_width, cy-2, SWP_NOZORDER|SWP_NOACTIVATE);
416 
417  EndDeferWindowPos(hdwp);
418 
419  WindowRect rect(_hwnd);
420  RECT work_area = {0, 0, GetSystemMetrics(SM_CXSCREEN), rect.top};
421  SystemParametersInfo(SPI_SETWORKAREA, 0, &work_area, 0); // don't use SPIF_SENDCHANGE because then we have to wait for any message being delivered
422  PostMessage(HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETWORKAREA, 0);
423 }
424 
425 
426 int DesktopBar::Command(int id, int code)
427 {
428  switch(id) {
429  case IDC_START:
431  break;
432 
433  case ID_ABOUT_EXPLORER:
435  break;
436 
439  break;
440 
441  case ID_MINIMIZE_ALL:
443  break;
444 
445  case ID_EXPLORE:
447  break;
448 
449  case ID_TASKMGR:
450  launch_file(_hwnd, TEXT("taskmgr.exe"), SW_SHOWNORMAL);
451  break;
452 
453  case ID_SWITCH_DESKTOP_1:
454  case ID_SWITCH_DESKTOP_1+1:
455  case ID_SWITCH_DESKTOP_1+2:
456  case ID_SWITCH_DESKTOP_1+3: {
457  int desktop_idx = id - ID_SWITCH_DESKTOP_1;
458 
459  g_Globals._desktops.SwitchToDesktop(desktop_idx);
460 
461  if (_hwndQuickLaunch)
463  break;}
464 
465 #ifdef __REACTOS__
466  case ID_TRAY_VOLUME:
467  launch_file(_hwnd, TEXT("sndvol32.exe"), SW_SHOWNORMAL); // launch volume control application
468  break;
469 
471  launch_cpanel(_hwnd, TEXT("mmsys.cpl"));
472  break;
473 #endif
474 
475  default:
476  if (_hwndQuickLaunch)
478  else
479  return 1;
480  }
481 
482  return 0;
483 }
484 
485 
487 {
488  if (_startMenuRoot)
489  {
490  // set the Button, if not set
493 
494  if (_startMenuRoot->IsStartMenuVisible())
495  _startMenuRoot->CloseStartMenu();
496  else
497  _startMenuRoot->TrackStartmenu();
498 
499  // StartMenu was closed, release button state
501  }
502 }
503 
504 
510 };
511 
513 {
514  // Is this a tray notification message?
515  if (pcd->dwData == 1) {
516  TrayNotifyCDS* ptr = (TrayNotifyCDS*) pcd->lpData;
517 
518  NotifyArea* notify_area = GET_WINDOW(NotifyArea, _hwndNotify);
519 
520  if (notify_area)
521  return notify_area->ProcessTrayNotification(ptr->notify_code, &ptr->nicon_data);
522  }
523 
524  return FALSE;
525 }
526 
527 
529 {
530  PRECT dragRect = (PRECT) lparam;
531  //int screenWidth = GetSystemMetrics(SM_CXSCREEN);
532  int screenHeight = GetSystemMetrics(SM_CYSCREEN);
533 
535 
536  switch(wparam) {
537  case WMSZ_BOTTOM:
538  break;
539 
540  case WMSZ_TOP: // Taskbar is at the bottom of the screen
541  dragRect->top = screenHeight - (((screenHeight - dragRect->top) + DESKTOPBARBAR_HEIGHT/2) / DESKTOPBARBAR_HEIGHT) * DESKTOPBARBAR_HEIGHT;
542  if (dragRect->top < screenHeight / 2)
543  dragRect->top = screenHeight - (screenHeight/2 / DESKTOPBARBAR_HEIGHT * DESKTOPBARBAR_HEIGHT);
544  else if (dragRect->top > screenHeight - 5)
545  dragRect->top = screenHeight - 5;
546  break;
547 
548  case WMSZ_RIGHT:
549  break;
550 
551  case WMSZ_LEFT:
552  break;
553  }
554 }
555 
556 
557 #ifdef __REACTOS__
558 
559 void DesktopBar::AddTrayIcons()
560 {
561  _trayIcon.Add(SmallIcon(IDI_SPEAKER), ResString(IDS_VOLUME));
562 }
563 
564 void DesktopBar::TrayClick(UINT id, int btn)
565 {
566  switch(id) {
567  case ID_TRAY_VOLUME:
568  if (btn == TRAYBUTTON_LEFT)
569  SetTimer(_hwnd, ID_TRAY_VOLUME, 500, NULL); // wait a bit to correctly handle double clicks
570  else {
571  PopupMenu menu(IDM_VOLUME);
573  menu.TrackPopupMenuAtPos(_hwnd, GetMessagePos());
574  }
575  break;
576  }
577 }
578 
579 void DesktopBar::TrayDblClick(UINT id, int btn)
580 {
581  switch(id) {
582  case ID_TRAY_VOLUME:
583  KillTimer(_hwnd, ID_TRAY_VOLUME); // finish one-click timer
584  launch_file(_hwnd, TEXT("sndvol32.exe"), SW_SHOWNORMAL); // launch volume control application
585  break;
586  }
587 }
588 
589 #endif
#define IDHK_STARTMENU
Definition: desktopbar.h:71
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WINDOW_CREATOR(WND_CLASS)
Definition: window.h:202
#define HTTOP
Definition: winuser.h:2444
#define WS_THICKFRAME
Definition: pedump.c:630
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
#define BS_OWNERDRAW
Definition: pedump.c:661
WindowHandle _hwndStartButton
Definition: desktopbar.h:115
HDWP WINAPI BeginDeferWindowPos(_In_ int)
#define TRUE
Definition: types.h:120
#define MAKEWPARAM(l, h)
Definition: winuser.h:3916
#define IDS_VOLUME
Definition: resource.h:39
BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow, LPCTSTR parameters)
Definition: utility.cpp:189
#define RBBIM_CHILD
Definition: commctrl.h:1478
void explorer_show_frame(int cmdShow, LPTSTR lpCmdLine)
Definition: explorer.cpp:707
#define RBS_VARHEIGHT
Definition: commctrl.h:1443
#define PM_UPDATE_DESKTOP
Definition: quicklaunch.h:34
void ExplorerPropertySheet(HWND hparent)
Definition: settings.cpp:37
#define WM_CONTEXTMENU
Definition: richedit.h:64
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
#define WM_LBUTTONDOWN
Definition: winuser.h:1752
#define GetStockFont(i)
Definition: windowsx.h:283
Definition: mk_font.cpp:20
#define pt(x, y)
Definition: drawing.c:79
#define WM_HOTKEY
Definition: winuser.h:1840
#define WS_EX_PALETTEWINDOW
Definition: winuser.h:399
WindowHandle _hwndrebar
Definition: desktopbar.h:113
#define MAKELPARAM(l, h)
Definition: winuser.h:3915
#define ID_DESKTOPBAR_SETTINGS
Definition: resource.h:205
virtual LRESULT Init(LPCREATESTRUCT pcs)
Definition: window.cpp:241
#define IDI_STARTMENU
Definition: resource.h:14
#define PM_REFRESH_CONFIG
Definition: explorer.h:70
#define SetWindowFont(hwnd, hfont, fRedraw)
Definition: windowsx.h:503
#define SystemParametersInfo
Definition: winuser.h:5724
#define ID_VOLUME_PROPERTIES
Definition: resource.h:216
void ProcessHotKey(int id_hotkey)
Definition: desktopbar.cpp:250
LONG top
Definition: windef.h:292
HANDLE HWND
Definition: compat.h:13
#define GET_X_LPARAM(lp)
Definition: windowsx.h:274
#define RBBIM_ID
Definition: commctrl.h:1482
static HWND Create(HWND hwndParent)
Definition: taskbar.cpp:107
static HWND Create()
Definition: desktopbar.cpp:64
#define IDHK_DESKTOP
Definition: traywnd.cpp:55
void RegisterHotkeys()
Definition: desktopbar.cpp:238
#define PM_GET_WIDTH
Definition: explorer.h:67
#define WMSZ_TOP
Definition: winuser.h:2420
#define WM_NCHITTEST
Definition: winuser.h:1668
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
DWORD WINAPI GetMessagePos(void)
Definition: message.c:1350
#define IDM_DESKTOPBAR
Definition: resource.h:95
int Notify(int id, NMHDR *pnmh)
Definition: desktopbar.cpp:377
#define SWP_NOZORDER
Definition: winuser.h:1232
#define VK_ESCAPE
Definition: winuser.h:2168
void ShowOrHideStartMenu()
Definition: desktopbar.cpp:486
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define IDS_START
Definition: resource.h:98
#define Button_GetState(hwndCtl)
Definition: windowsx.h:7
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define IDHK_RUN
Definition: traywnd.cpp:45
struct StartMenuRoot * _startMenuRoot
Definition: desktopbar.h:117
#define ID_MINIMIZE_ALL
Definition: resource.h:212
& rect
Definition: startmenu.cpp:1413
#define WM_SETTINGCHANGE
Definition: winuser.h:1611
#define DrawText
Definition: winuser.h:5637
void explorer_about(HWND hwndParent)
Definition: explorer.cpp:934
#define SC_TASKLIST
Definition: winuser.h:2553
#define IDC_START
Definition: resource.h:137
WindowHandle _hwndQuickLaunch
Definition: desktopbar.h:112
UINT code
Definition: winuser.h:3112
#define GCL_STYLE
Definition: winuser.h:665
int WINAPI GetDlgCtrlID(_In_ HWND)
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define RBBIM_SIZE
Definition: commctrl.h:1480
else
Definition: tritemp.h:161
static HWND Create(HWND hwndParent)
Definition: quicklaunch.cpp:72
#define CCS_NODIVIDER
Definition: commctrl.h:2220
#define SM_CXSCREEN
Definition: winuser.h:949
special "Start" button with one click activation
Definition: desktopbar.h:132
ULONG_PTR dwData
Definition: winuser.h:2954
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: window.cpp:865
#define ID_TRAY_VOLUME
Definition: resource.h:215
#define DT_CALCRECT
Definition: winuser.h:526
#define MF_BYPOSITION
Definition: winuser.h:203
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
BOOL launch_cpanel(HWND hwnd, LPCTSTR applet)
Definition: utility.cpp:383
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
HWND WINAPI GetCapture(void)
Definition: message.c:2879
static PVOID ptr
Definition: dispmode.c:27
#define CreateWindowEx
Definition: winuser.h:5621
#define WINMSG_TASKBARCREATED
Definition: window.h:986
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
#define WM_SIZING
Definition: winuser.h:1783
#define RB_INSERTBAND
Definition: commctrl.h:1574
smooth NULL
Definition: ftsmooth.c:416
WindowHandle _hwndTaskBar
Definition: desktopbar.h:110
#define RBN_CHILDSIZE
Definition: commctrl.h:1608
LONG_PTR LPARAM
Definition: windef.h:208
#define CCS_TOP
Definition: commctrl.h:2214
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
#define Button_SetState(hwndCtl, state)
Definition: windowsx.h:11
#define ID_TASKMGR
Definition: resource.h:214
static HWND Create(CREATORFUNC creator, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
Definition: window.cpp:87
#define RBBS_HIDETITLE
#define SetClassLongPtr
Definition: winuser.h:5714
DesktopBar(HWND hwnd)
Definition: desktopbar.cpp:40
#define RBBS_VARIABLEHEIGHT
Definition: commctrl.h:1467
#define HTSIZEFIRST
Definition: winuser.h:2442
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define IDW_QUICKLAUNCHBAR
Definition: quicklaunch.h:32
#define PM_GET_NOTIFYAREA
Definition: traynotify.h:44
#define PostMessage
Definition: winuser.h:5698
#define IDI_SPEAKER
Definition: resource.h:112
convenient loading of small (16x16) icon resources
Definition: globals.h:320
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: desktopbar.cpp:277
#define RBS_AUTOSIZE
Definition: commctrl.h:1447
#define PM_RESIZE_CHILDREN
Definition: explorer.h:66
char TCHAR
Definition: xmlstorage.h:189
#define WM_COPYDATA
Definition: winuser.h:1646
#define SM_CYSCREEN
Definition: winuser.h:950
#define _T(x)
Definition: vfdio.h:22
GLsizeiptr size
Definition: glext.h:5919
#define REBARBANDINFO
Definition: commctrl.h:1541
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define RBBIM_TEXT
Definition: commctrl.h:1476
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define WM_TIMER
Definition: winuser.h:1718
#define WMSZ_RIGHT
Definition: winuser.h:2419
#define WM_CLOSE
Definition: winuser.h:1603
WindowHandle _hwndNotify
Definition: desktopbar.h:111
window class with gray background color
Definition: window.h:248
int WINAPI GetSystemMetrics(_In_ int)
#define HTBOTTOM
Definition: winuser.h:2447
unsigned long DWORD
Definition: ntddk_ex.h:95
tray notification area aka "tray"
Definition: traynotify.h:130
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1479
#define IDW_TASKTOOLBAR
Definition: taskbar.h:43
#define ID_EXPLORE
Definition: resource.h:213
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
HINSTANCE _hInstance
Definition: globals.h:270
#define IDI_REACTOS
Definition: osk_res.h:25
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: window.h:631
void Resize(int cx, int cy)
Definition: desktopbar.cpp:396
#define COLOR_BTNFACE
Definition: winuser.h:918
#define WM_CANCELMODE
Definition: winuser.h:1617
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
#define IDHK_LOGOFF
Definition: desktopbar.h:70
#define CS_DBLCLKS
Definition: winuser.h:646
#define WM_COMMAND
Definition: winuser.h:1716
#define GetClassLongPtr
Definition: winuser.h:5648
#define WMSZ_BOTTOM
Definition: winuser.h:2423
#define IDC_LOGOFF
Definition: desktopbar.h:38
int Command(int id, int code)
Definition: desktopbar.cpp:426
#define PM_GET_LAST_ACTIVE
Definition: taskbar.h:46
#define REBARCLASSNAME
Definition: commctrl.h:1438
void ToggleMinimize()
minimize/restore all windows on the desktop
Definition: desktop.cpp:229
#define RegisterWindowMessage
Definition: winuser.h:5706
void SetWindowIcon(HWND hwnd, UINT nid)
set big and small icons out of the resources for a window
Definition: explorer.cpp:689
#define DT_SINGLELINE
Definition: winuser.h:540
HWND WINAPI GetParent(_In_ HWND)
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define TEXT(s)
Definition: k32.h:26
static HWND Create(HWND hwndParent)
Definition: traynotify.cpp:367
#define GET_WINDOW(CLASS, hwnd)
Definition: window.h:88
#define ANSI_VAR_FONT
Definition: wingdi.h:906
#define DESKTOPBARBAR_HEIGHT
Definition: desktopbar.h:33
#define CLASSNAME_EXPLORERBAR
Definition: desktopbar.h:29
#define ID_ABOUT_EXPLORER
Definition: resource.h:204
LRESULT ProcessCopyData(COPYDATASTRUCT *pcd)
Definition: desktopbar.cpp:512
desktop bar window, also known as "system tray"
Definition: desktopbar.h:74
#define MOD_CONTROL
Definition: imm.h:312
#define REBARBAND_HEIGHT
Definition: desktopbar.h:34
int _taskbar_pos
Definition: desktopbar.h:96
#define SC_SIZE
Definition: winuser.h:2538
#define STARTMENUROOT_ICON_SIZE
Definition: globals.h:173
#define WM_LBUTTONUP
Definition: winuser.h:1753
#define IDC_LAUNCH
Definition: desktopbar.h:40
void ControlResize(WPARAM wparam, LPARAM lparam)
Definition: desktopbar.cpp:528
#define WS_POPUP
Definition: pedump.c:616
unsigned int UINT
Definition: ndis.h:50
#define WM_MOUSEMOVE
Definition: winuser.h:1751
HWND WINAPI WindowFromPoint(_In_ POINT)
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:275
#define RBBS_GRIPPERALWAYS
Definition: commctrl.h:1468
#define IDHK_EXPLORER
Definition: desktopbar.h:67
RECT _work_area_org
Definition: desktopbar.h:95
_Out_opt_ int * cx
Definition: commctrl.h:570
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2888
#define SendMessage
Definition: winuser.h:5709
GLuint res
Definition: glext.h:9613
static HWND Create(HWND hwndDesktopBar, int icon_size)
Definition: startmenu.cpp:1608
#define HIWORD(l)
Definition: typedefs.h:246
unsigned int ULONG
Definition: retypes.h:1
Desktops _desktops
Definition: globals.h:291
NOTIFYICONDATA nicon_data
Definition: desktopbar.cpp:509
void SwitchToDesktop(int idx)
Definition: desktop.cpp:163
LONG bottom
Definition: windef.h:294
#define RBS_DBLCLKTOGGLE
Definition: commctrl.h:1449
#define MOD_WIN
Definition: winuser.h:2598
const UINT WM_TASKBARCREATED
Definition: desktopbar.h:126
struct tagRECT * PRECT
BOOL WINAPI RegisterHotKey(_In_opt_ HWND, _In_ int, _In_ UINT, _In_ UINT)
copy data structure for tray notifications
Definition: desktopbar.cpp:506
convenient loading of string resources
Definition: globals.h:303
#define HTCLIENT
Definition: winuser.h:2429
GLfloat GLfloat p
Definition: glext.h:8902
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
LONG_PTR LRESULT
Definition: windef.h:209
#define WS_VISIBLE
Definition: pedump.c:620
HBRUSH WINAPI GetSysColorBrush(_In_ int)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: desktopbar.cpp:178
#define HWND_BROADCAST
Definition: winuser.h:1190
DWORD WINAPI SHRestricted(RESTRICTIONS policy)
Definition: shpolicy.c:836
#define WM_SYSCOMMAND
Definition: winuser.h:1717
HWND _hwndDesktop
Definition: globals.h:289
#define LOWORD(l)
Definition: pedump.c:82
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1483
LRESULT Init(LPCREATESTRUCT pcs)
Definition: desktopbar.cpp:86
#define WMSZ_LEFT
Definition: winuser.h:2418
#define ID_SWITCH_DESKTOP_1
Definition: resource.h:225
#define HTSIZELAST
Definition: winuser.h:2450
StartButton(HWND hwnd)
Definition: desktopbar.cpp:173
void ShowExitWindowsDialog(HWND hwndOwner)
Definition: startmenu.cpp:2128
static UINT WPARAM wparam
Definition: combo.c:716
Startmenu root window.
Definition: startmenu.h:364
#define IDM_VOLUME
Definition: resource.h:96
Definition: window.h:572
#define TITLE_EXPLORERBAR
Definition: desktopbar.h:30