Skip to content

Commit 1e0d9fe

Browse files
committed
Tabs to spaces
1 parent cc97f1c commit 1e0d9fe

File tree

6 files changed

+428
-428
lines changed

6 files changed

+428
-428
lines changed

audio-router-gui/clsSysTray.cpp

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
clsSysTray::clsSysTray()
66
{
7-
bInTray = false;
8-
NotifyIconData.cbSize = sizeof(NotifyIconData);
9-
NotifyIconData.uID = uID = 2;
10-
NotifyIconData.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
11-
NotifyIconData.uCallbackMessage = WM_TRAYNOTIFY;
12-
NotifyIconData.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MAINFRAME));
13-
NotifyIconData.szTip[0] = '\0';
14-
NotifyIconData.hWnd = NULL;
7+
bInTray = false;
8+
NotifyIconData.cbSize = sizeof(NotifyIconData);
9+
NotifyIconData.uID = uID = 2;
10+
NotifyIconData.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
11+
NotifyIconData.uCallbackMessage = WM_TRAYNOTIFY;
12+
NotifyIconData.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MAINFRAME));
13+
NotifyIconData.szTip[0] = '\0';
14+
NotifyIconData.hWnd = NULL;
1515
}
1616

1717

@@ -21,69 +21,69 @@ clsSysTray::~clsSysTray()
2121

2222
BOOL clsSysTray::SetIcon(HICON hNewIcon)
2323
{
24-
NotifyIconData.hIcon = hNewIcon;
25-
if (bInTray)
26-
{
27-
BOOL iRetVal;
28-
iRetVal = Shell_NotifyIcon(NIM_MODIFY, &NotifyIconData);
29-
if (iRetVal)
30-
{
31-
bInTray = true;
32-
}
33-
return iRetVal;
34-
}
35-
else
36-
return (1);
24+
NotifyIconData.hIcon = hNewIcon;
25+
if (bInTray)
26+
{
27+
BOOL iRetVal;
28+
iRetVal = Shell_NotifyIcon(NIM_MODIFY, &NotifyIconData);
29+
if (iRetVal)
30+
{
31+
bInTray = true;
32+
}
33+
return iRetVal;
34+
}
35+
else
36+
return (1);
3737
}
3838

3939
HICON clsSysTray::GetIcon()
4040
{
41-
return NotifyIconData.hIcon;
41+
return NotifyIconData.hIcon;
4242
}
4343

4444
BOOL clsSysTray::SetTipText(char *lpstrNewTipText)
4545
{
46-
//strncpy(NotifyIconData.szTip, lpstrNewTipText);
47-
if (bInTray)
48-
{
49-
BOOL iRetVal;
50-
iRetVal = Shell_NotifyIcon(NIM_MODIFY, &NotifyIconData);
51-
if (iRetVal)
52-
{
53-
bInTray = true;
54-
}
55-
return iRetVal;
56-
}
57-
else
58-
return (1);
46+
//strncpy(NotifyIconData.szTip, lpstrNewTipText);
47+
if (bInTray)
48+
{
49+
BOOL iRetVal;
50+
iRetVal = Shell_NotifyIcon(NIM_MODIFY, &NotifyIconData);
51+
if (iRetVal)
52+
{
53+
bInTray = true;
54+
}
55+
return iRetVal;
56+
}
57+
else
58+
return (1);
5959
}
6060

6161
char *clsSysTray::GetTipText()
6262
{
63-
return "test"; // NotifyIconData.szTip;
63+
return "test"; // NotifyIconData.szTip;
6464
}
6565

6666
BOOL clsSysTray::AddIcon()
6767
{
68-
BOOL iRetVal;
69-
NotifyIconData.hWnd = hWnd;
70-
NotifyIconData.uID = uID;
71-
iRetVal = Shell_NotifyIcon(NIM_ADD, &NotifyIconData);
72-
if (iRetVal)
73-
{
74-
bInTray = true;
68+
BOOL iRetVal;
69+
NotifyIconData.hWnd = hWnd;
70+
NotifyIconData.uID = uID;
71+
iRetVal = Shell_NotifyIcon(NIM_ADD, &NotifyIconData);
72+
if (iRetVal)
73+
{
74+
bInTray = true;
7575

76-
}
77-
return iRetVal;
76+
}
77+
return iRetVal;
7878
}
7979

8080
BOOL clsSysTray::RemoveIcon()
8181
{
82-
BOOL iRetVal;
83-
iRetVal = Shell_NotifyIcon(NIM_DELETE, &NotifyIconData);
84-
if (iRetVal)
85-
{
86-
bInTray = false;
87-
}
88-
return iRetVal;
82+
BOOL iRetVal;
83+
iRetVal = Shell_NotifyIcon(NIM_DELETE, &NotifyIconData);
84+
if (iRetVal)
85+
{
86+
bInTray = false;
87+
}
88+
return iRetVal;
8989
}

audio-router-gui/clsSysTray.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33

44
#include <windows.h>
55

6-
#define WM_TRAYNOTIFY 0XA44C
6+
#define WM_TRAYNOTIFY 0XA44C
77
#include <shellapi.h>
88

99
class clsSysTray
1010
{
1111
public:
12-
clsSysTray();
13-
~clsSysTray();
14-
BOOL SetIcon(HICON hNewIcon);
15-
HICON GetIcon();
16-
BOOL SetTipText(char *lpstrNewTipText);
17-
char *GetTipText();
18-
BOOL AddIcon();
19-
BOOL RemoveIcon();
20-
HWND hWnd;
21-
UINT uID;
12+
clsSysTray();
13+
~clsSysTray();
14+
BOOL SetIcon(HICON hNewIcon);
15+
HICON GetIcon();
16+
BOOL SetTipText(char *lpstrNewTipText);
17+
char *GetTipText();
18+
BOOL AddIcon();
19+
BOOL RemoveIcon();
20+
HWND hWnd;
21+
UINT uID;
2222
protected:
23-
NOTIFYICONDATA NotifyIconData;
24-
bool bInTray;
23+
NOTIFYICONDATA NotifyIconData;
24+
bool bInTray;
2525
};
2626

2727

0 commit comments

Comments
 (0)