Skip to content

Commit

Permalink
Tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfreak99 committed Jul 2, 2017
1 parent cc97f1c commit 1e0d9fe
Show file tree
Hide file tree
Showing 6 changed files with 428 additions and 428 deletions.
104 changes: 52 additions & 52 deletions audio-router-gui/clsSysTray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

clsSysTray::clsSysTray()
{
bInTray = false;
NotifyIconData.cbSize = sizeof(NotifyIconData);
NotifyIconData.uID = uID = 2;
NotifyIconData.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
NotifyIconData.uCallbackMessage = WM_TRAYNOTIFY;
NotifyIconData.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MAINFRAME));
NotifyIconData.szTip[0] = '\0';
NotifyIconData.hWnd = NULL;
bInTray = false;
NotifyIconData.cbSize = sizeof(NotifyIconData);
NotifyIconData.uID = uID = 2;
NotifyIconData.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
NotifyIconData.uCallbackMessage = WM_TRAYNOTIFY;
NotifyIconData.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MAINFRAME));
NotifyIconData.szTip[0] = '\0';
NotifyIconData.hWnd = NULL;
}


Expand All @@ -21,69 +21,69 @@ clsSysTray::~clsSysTray()

BOOL clsSysTray::SetIcon(HICON hNewIcon)
{
NotifyIconData.hIcon = hNewIcon;
if (bInTray)
{
BOOL iRetVal;
iRetVal = Shell_NotifyIcon(NIM_MODIFY, &NotifyIconData);
if (iRetVal)
{
bInTray = true;
}
return iRetVal;
}
else
return (1);
NotifyIconData.hIcon = hNewIcon;
if (bInTray)
{
BOOL iRetVal;
iRetVal = Shell_NotifyIcon(NIM_MODIFY, &NotifyIconData);
if (iRetVal)
{
bInTray = true;
}
return iRetVal;
}
else
return (1);
}

HICON clsSysTray::GetIcon()
{
return NotifyIconData.hIcon;
return NotifyIconData.hIcon;
}

BOOL clsSysTray::SetTipText(char *lpstrNewTipText)
{
//strncpy(NotifyIconData.szTip, lpstrNewTipText);
if (bInTray)
{
BOOL iRetVal;
iRetVal = Shell_NotifyIcon(NIM_MODIFY, &NotifyIconData);
if (iRetVal)
{
bInTray = true;
}
return iRetVal;
}
else
return (1);
//strncpy(NotifyIconData.szTip, lpstrNewTipText);
if (bInTray)
{
BOOL iRetVal;
iRetVal = Shell_NotifyIcon(NIM_MODIFY, &NotifyIconData);
if (iRetVal)
{
bInTray = true;
}
return iRetVal;
}
else
return (1);
}

char *clsSysTray::GetTipText()
{
return "test"; // NotifyIconData.szTip;
return "test"; // NotifyIconData.szTip;
}

BOOL clsSysTray::AddIcon()
{
BOOL iRetVal;
NotifyIconData.hWnd = hWnd;
NotifyIconData.uID = uID;
iRetVal = Shell_NotifyIcon(NIM_ADD, &NotifyIconData);
if (iRetVal)
{
bInTray = true;
BOOL iRetVal;
NotifyIconData.hWnd = hWnd;
NotifyIconData.uID = uID;
iRetVal = Shell_NotifyIcon(NIM_ADD, &NotifyIconData);
if (iRetVal)
{
bInTray = true;

}
return iRetVal;
}
return iRetVal;
}

BOOL clsSysTray::RemoveIcon()
{
BOOL iRetVal;
iRetVal = Shell_NotifyIcon(NIM_DELETE, &NotifyIconData);
if (iRetVal)
{
bInTray = false;
}
return iRetVal;
BOOL iRetVal;
iRetVal = Shell_NotifyIcon(NIM_DELETE, &NotifyIconData);
if (iRetVal)
{
bInTray = false;
}
return iRetVal;
}
26 changes: 13 additions & 13 deletions audio-router-gui/clsSysTray.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@

#include <windows.h>

#define WM_TRAYNOTIFY 0XA44C
#define WM_TRAYNOTIFY 0XA44C
#include <shellapi.h>

class clsSysTray
{
public:
clsSysTray();
~clsSysTray();
BOOL SetIcon(HICON hNewIcon);
HICON GetIcon();
BOOL SetTipText(char *lpstrNewTipText);
char *GetTipText();
BOOL AddIcon();
BOOL RemoveIcon();
HWND hWnd;
UINT uID;
clsSysTray();
~clsSysTray();
BOOL SetIcon(HICON hNewIcon);
HICON GetIcon();
BOOL SetTipText(char *lpstrNewTipText);
char *GetTipText();
BOOL AddIcon();
BOOL RemoveIcon();
HWND hWnd;
UINT uID;
protected:
NOTIFYICONDATA NotifyIconData;
bool bInTray;
NOTIFYICONDATA NotifyIconData;
bool bInTray;
};


Loading

0 comments on commit 1e0d9fe

Please sign in to comment.