ReactOS 0.4.16-dev-329-g9223134
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
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
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
111
112 // create task bar
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
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
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) {
212
214
215 ClientToScreen(_hwnd, &pt);
217
218 if (hwnd && hwnd!=_hwnd) {
222 }
223 }
224 break;
225
226 case WM_CANCELMODE:
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
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
250void 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:
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
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
359 return (LRESULT)(HWND)_hwndNotify;
360
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
377int 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
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 {
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
426int DesktopBar::Command(int id, int code)
427{
428 switch(id) {
429 case IDC_START:
431 break;
432
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
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
460
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:
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
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
559void DesktopBar::AddTrayIcons()
560{
561 _trayIcon.Add(SmallIcon(IDI_SPEAKER), ResString(IDS_VOLUME));
562}
563
564void 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
579void 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
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
#define IDS_START
Definition: resource.h:23
#define IDI_STARTMENU
Definition: resource.h:14
#define REBARBAND_HEIGHT
Definition: desktopbar.h:34
#define IDHK_RUN
Definition: desktopbar.h:68
#define TITLE_EXPLORERBAR
Definition: desktopbar.h:30
#define IDC_START
Definition: desktopbar.h:37
#define CLASSNAME_EXPLORERBAR
Definition: desktopbar.h:29
#define IDHK_STARTMENU
Definition: desktopbar.h:71
#define IDC_LAUNCH
Definition: desktopbar.h:40
#define IDHK_DESKTOP
Definition: desktopbar.h:69
#define IDHK_EXPLORER
Definition: desktopbar.h:67
#define IDC_LOGOFF
Definition: desktopbar.h:38
#define DESKTOPBARBAR_HEIGHT
Definition: desktopbar.h:33
#define IDHK_LOGOFF
Definition: desktopbar.h:70
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HANDLE HWND
Definition: compat.h:19
#define pt(x, y)
Definition: drawing.c:79
#define PM_REFRESH_CONFIG
Definition: explorer.h:70
#define PM_RESIZE_CHILDREN
Definition: explorer.h:66
#define PM_GET_WIDTH
Definition: explorer.h:67
void ShowExitWindowsDialog(HWND hwndOwner)
Definition: startmenu.cpp:2128
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
GLfloat GLfloat p
Definition: glext.h:8902
#define MOD_CONTROL
Definition: imm.h:185
#define TEXT(s)
Definition: k32.h:26
#define RBBS_HIDETITLE
void ExplorerPropertySheet(HWND hparent)
Definition: settings.cpp:37
void SetWindowIcon(HWND hwnd, UINT nid)
set big and small icons out of the resources for a window
Definition: explorer.cpp:689
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
void explorer_show_frame(int cmdShow, LPTSTR lpCmdLine)
Definition: explorer.cpp:707
void explorer_about(HWND hwndParent)
Definition: explorer.cpp:934
#define STARTMENUROOT_ICON_SIZE
Definition: globals.h:173
#define ID_ABOUT_EXPLORER
Definition: resource.h:204
#define ID_TASKMGR
Definition: resource.h:214
#define IDM_DESKTOPBAR
Definition: resource.h:95
#define IDS_VOLUME
Definition: resource.h:39
#define ID_DESKTOPBAR_SETTINGS
Definition: resource.h:205
#define ID_TRAY_VOLUME
Definition: resource.h:215
#define ID_MINIMIZE_ALL
Definition: resource.h:212
#define ID_EXPLORE
Definition: resource.h:213
#define ID_SWITCH_DESKTOP_1
Definition: resource.h:225
#define IDI_SPEAKER
Definition: resource.h:112
#define IDM_VOLUME
Definition: resource.h:96
#define ID_VOLUME_PROPERTIES
Definition: resource.h:216
BOOL launch_cpanel(HWND hwnd, LPCTSTR applet)
Definition: utility.cpp:383
BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow, LPCTSTR parameters)
Definition: utility.cpp:189
#define GET_WINDOW(CLASS, hwnd)
Definition: window.h:88
@ TRAYBUTTON_LEFT
Definition: window.h:982
#define WINDOW_CREATOR(WND_CLASS)
Definition: window.h:202
#define WINMSG_TASKBARCREATED
Definition: window.h:986
static PVOID ptr
Definition: dispmode.c:27
Definition: mk_font.cpp:20
unsigned int UINT
Definition: ndis.h:50
#define IDI_REACTOS
Definition: osk_res.h:21
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_POPUP
Definition: pedump.c:616
#define WS_VISIBLE
Definition: pedump.c:620
#define BS_OWNERDRAW
Definition: pedump.c:661
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_THICKFRAME
Definition: pedump.c:630
#define RBN_CHILDSIZE
Definition: commctrl.h:1636
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
#define RB_INSERTBAND
Definition: commctrl.h:1602
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1507
#define REBARBANDINFO
Definition: commctrl.h:1569
#define RBBIM_CHILD
Definition: commctrl.h:1506
_Out_opt_ int * cx
Definition: commctrl.h:585
#define RBS_AUTOSIZE
Definition: commctrl.h:1475
#define REBARCLASSNAME
Definition: commctrl.h:1466
#define CCS_NODIVIDER
Definition: commctrl.h:2253
#define CCS_TOP
Definition: commctrl.h:2247
#define RBBIM_ID
Definition: commctrl.h:1510
#define RBS_VARHEIGHT
Definition: commctrl.h:1471
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2251
#define RBBIM_STYLE
Definition: commctrl.h:1502
#define RBBIM_SIZE
Definition: commctrl.h:1508
#define RBBIM_TEXT
Definition: commctrl.h:1504
#define RBS_DBLCLKTOGGLE
Definition: commctrl.h:1477
#define RBBS_GRIPPERALWAYS
Definition: commctrl.h:1496
#define RBBS_VARIABLEHEIGHT
Definition: commctrl.h:1495
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1511
#define PM_UPDATE_DESKTOP
Definition: quicklaunch.h:34
#define IDW_QUICKLAUNCHBAR
Definition: quicklaunch.h:32
#define WM_CONTEXTMENU
Definition: richedit.h:64
@ REST_NOTRAYITEMSDISPLAY
Definition: shlobj.h:1792
DWORD WINAPI SHRestricted(RESTRICTIONS rest)
Definition: shpolicy.c:150
& rect
Definition: startmenu.cpp:1413
window class with gray background color
Definition: window.h:249
Definition: window.h:573
desktop bar window, also known as "system tray"
Definition: desktopbar.h:81
void Resize(int cx, int cy)
Definition: desktopbar.cpp:396
WindowHandle _hwndrebar
Definition: desktopbar.h:113
const UINT WM_TASKBARCREATED
Definition: desktopbar.h:126
int Notify(int id, NMHDR *pnmh)
Definition: desktopbar.cpp:377
WindowHandle _hwndQuickLaunch
Definition: desktopbar.h:112
WindowHandle _hwndNotify
Definition: desktopbar.h:111
void ShowOrHideStartMenu()
Definition: desktopbar.cpp:486
LRESULT Init(LPCREATESTRUCT pcs)
Definition: desktopbar.cpp:86
void RegisterHotkeys()
Definition: desktopbar.cpp:238
WindowHandle _hwndTaskBar
Definition: desktopbar.h:110
void ControlResize(WPARAM wparam, LPARAM lparam)
Definition: desktopbar.cpp:528
WindowHandle _hwndStartButton
Definition: desktopbar.h:115
int Command(int id, int code)
Definition: desktopbar.cpp:426
RECT _work_area_org
Definition: desktopbar.h:95
struct StartMenuRoot * _startMenuRoot
Definition: desktopbar.h:117
DesktopBar(HWND hwnd)
Definition: desktopbar.cpp:40
void ProcessHotKey(int id_hotkey)
Definition: desktopbar.cpp:250
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: desktopbar.cpp:277
int _taskbar_pos
Definition: desktopbar.h:96
static HWND Create()
Definition: desktopbar.cpp:64
LRESULT ProcessCopyData(COPYDATASTRUCT *pcd)
Definition: desktopbar.cpp:512
void SwitchToDesktop(int idx)
Definition: desktop.cpp:163
void ToggleMinimize()
minimize/restore all windows on the desktop
Definition: desktop.cpp:229
HINSTANCE _hInstance
Definition: globals.h:270
Desktops _desktops
Definition: globals.h:291
HWND _hwndDesktop
Definition: globals.h:289
tray notification area aka "tray"
Definition: traynotify.h:131
static HWND Create(HWND hwndParent)
Definition: traynotify.cpp:367
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: window.h:631
static HWND Create(HWND hwndParent)
Definition: quicklaunch.cpp:72
convenient loading of string resources
Definition: globals.h:304
convenient loading of small (16x16) icon resources
Definition: globals.h:321
special "Start" button with one click activation
Definition: desktopbar.h:133
StartButton(HWND hwnd)
Definition: desktopbar.cpp:173
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: desktopbar.cpp:178
Startmenu root window.
Definition: startmenu.h:365
static HWND Create(HWND hwndDesktopBar, int icon_size)
Definition: startmenu.cpp:1608
static HWND Create(HWND hwndParent)
Definition: taskbar.cpp:107
copy data structure for tray notifications
Definition: desktopbar.cpp:506
NOTIFYICONDATA nicon_data
Definition: desktopbar.cpp:509
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: window.cpp:280
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
virtual LRESULT Init(LPCREATESTRUCT pcs)
Definition: window.cpp:241
Definition: inflate.c:139
ULONG_PTR dwData
Definition: winuser.h:3004
UINT code
Definition: winuser.h:3162
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
#define PM_GET_LAST_ACTIVE
Definition: taskbar.h:46
#define IDW_TASKTOOLBAR
Definition: taskbar.h:43
#define PM_GET_NOTIFYAREA
Definition: traynotify.h:44
else
Definition: tritemp.h:161
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define _T(x)
Definition: vfdio.h:22
#define PRECT
Definition: precomp.h:27
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define Button_GetState(hwndCtl)
Definition: windowsx.h:32
#define Button_SetState(hwndCtl, state)
Definition: windowsx.h:36
#define SetWindowFont(hwnd, hfont, fRedraw)
Definition: windowsx.h:533
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
#define GetStockFont(i)
Definition: windowsx.h:308
#define ANSI_VAR_FONT
Definition: wingdi.h:907
#define SW_SHOWNORMAL
Definition: winuser.h:773
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define CreateWindowEx
Definition: winuser.h:5767
#define MAKEWPARAM(l, h)
Definition: winuser.h:4012
#define HTSIZELAST
Definition: winuser.h:2499
#define WM_CLOSE
Definition: winuser.h:1624
#define SWP_NOACTIVATE
Definition: winuser.h:1245
#define WM_SYSCOMMAND
Definition: winuser.h:1744
#define MAKELPARAM(l, h)
Definition: winuser.h:4011
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
DWORD WINAPI GetMessagePos(void)
Definition: message.c:1351
#define SM_CYSCREEN
Definition: winuser.h:963
#define MOD_WIN
Definition: winuser.h:2647
#define HTBOTTOM
Definition: winuser.h:2496
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SIZE
Definition: winuser.h:1614
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define HWND_BROADCAST
Definition: winuser.h:1207
#define WM_CANCELMODE
Definition: winuser.h:1638
#define DT_SINGLELINE
Definition: winuser.h:540
#define WM_COMMAND
Definition: winuser.h:1743
#define WM_NCHITTEST
Definition: winuser.h:1689
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define WMSZ_TOP
Definition: winuser.h:2469
#define WM_MOUSEMOVE
Definition: winuser.h:1778
HWND WINAPI GetCapture(void)
Definition: message.c:2881
#define SC_TASKLIST
Definition: winuser.h:2602
#define GetClassLongPtr
Definition: winuser.h:5794
#define CS_DBLCLKS
Definition: winuser.h:651
#define WM_LBUTTONDOWN
Definition: winuser.h:1779
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1629
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
#define WMSZ_LEFT
Definition: winuser.h:2467
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WS_EX_PALETTEWINDOW
Definition: winuser.h:399
#define DrawText
Definition: winuser.h:5783
#define SC_SIZE
Definition: winuser.h:2587
#define WM_SETTINGCHANGE
Definition: winuser.h:1632
BOOL WINAPI RegisterHotKey(_In_opt_ HWND, _In_ int, _In_ UINT, _In_ UINT)
#define RegisterWindowMessage
Definition: winuser.h:5852
#define WM_TIMER
Definition: winuser.h:1745
#define MF_BYPOSITION
Definition: winuser.h:203
#define HTCLIENT
Definition: winuser.h:2478
#define WM_COPYDATA
Definition: winuser.h:1667
#define SendMessage
Definition: winuser.h:5855
#define HTSIZEFIRST
Definition: winuser.h:2491
#define WM_LBUTTONUP
Definition: winuser.h:1780
#define PostMessage
Definition: winuser.h:5844
HWND WINAPI GetParent(_In_ HWND)
#define WMSZ_BOTTOM
Definition: winuser.h:2472
#define WM_SIZING
Definition: winuser.h:1810
#define HTTOP
Definition: winuser.h:2493
HWND WINAPI WindowFromPoint(_In_ POINT)
#define WMSZ_RIGHT
Definition: winuser.h:2468
#define WM_HOTKEY
Definition: winuser.h:1882
int WINAPI GetDlgCtrlID(_In_ HWND)
#define SetClassLongPtr
Definition: winuser.h:5860
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SM_CXSCREEN
Definition: winuser.h:962
#define SWP_NOZORDER
Definition: winuser.h:1250
#define DT_CALCRECT
Definition: winuser.h:526
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SystemParametersInfo
Definition: winuser.h:5870
#define VK_ESCAPE
Definition: winuser.h:2217
int WINAPI GetSystemMetrics(_In_ int)
#define GCL_STYLE
Definition: winuser.h:670
#define COLOR_BTNFACE
Definition: winuser.h:931
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
char TCHAR
Definition: xmlstorage.h:189