SystemTray class

This is a discussion on SystemTray class within the C++ Programming forums, part of the General Programming Boards category; Ok, I'm trying to use the SystemTray class from here (CodeProject) , but whenever I include the Systemtray.h and compile, ...

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    7

    Question SystemTray class

    Ok, I'm trying to use the SystemTray class from here (CodeProject) , but whenever I include the Systemtray.h and compile, it errors out with:

    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(231): error C2065: 'NIIF_ERROR' : undeclared identifier
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(231): error C2065: 'NIIF_INFO' : undeclared identifier
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(231): error C2065: 'NIIF_WARNING' : undeclared identifier
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(236): error C2065: 'NIF_INFO' : undeclared identifier
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(236): error C2297: '|=' : illegal, right operand has type ''unknown-type''
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(238): error C2039: 'szInfo' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(240): error C2039: 'szInfoTitle' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(242): error C2039: 'szInfoTitle' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(243): error C2039: 'uTimeout' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(244): error C2039: 'dwInfoFlags' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(253): error C2065: 'NIF_STATE' : undeclared identifier
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(253): error C2440: '=' : cannot convert from ''unknown-type'' to 'UINT'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(254): error C2039: 'dwState' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(254): error C2065: 'NIS_HIDDEN' : undeclared identifier
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(255): error C2039: 'dwStateMask' : is not a member of '_NOTIFYICONDATAA'
    c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ShellAPI.h(529) : see declaration of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(273): error C2039: 'szInfo' : is not a member of '_NOTIFYICONDATAA'
    c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ShellAPI.h(529) : see declaration of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(312): error C2065: 'NIM_SETFOCUS' : undeclared identifier
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(360): error C2440: '=' : cannot convert from ''unknown-type'' to 'UINT'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(361): error C2039: 'dwState' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(362): error C2039: 'dwStateMask' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(384): error C2440: '=' : cannot convert from ''unknown-type'' to 'UINT'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(385): error C2039: 'dwState' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(386): error C2039: 'dwStateMask' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(502): warning C4244: '=' : conversion from 'UINT_PTR' to 'UINT', possible loss of data
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(633): error C2440: '=' : cannot convert from ''unknown-type'' to 'UINT'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(634): error C2039: 'szInfo' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(636): error C2039: 'szInfoTitle' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(638): error C2039: 'szInfoTitle' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(639): error C2039: 'dwInfoFlags' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(640): error C2039: 'uTimeout' : is not a member of '_NOTIFYICONDATAA'
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(646): error C2039: 'szInfo' : is not a member of '_NOTIFYICONDATAA'


    I'm using Visual C++ .NET. Thanks for any help!

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    c:\Documents and Settings\jair\My Documents\Visual Studio Projects\netMon\SystemTray.cpp(231): error C2065: 'NIIF_ERROR' : undeclared identifier
    Find out where 'NIIF_ERROR' is defined and include that header. Then go from there. Since you have Visual Studios, you should have the MSDN. Hilight the item in question, press F1. Watch and be amazed.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    7
    Thanks for the tip about F1, never knew that... I tried to include the ShellAPI.h header that was included in stdafx.h, but it still errors on me. I checked, and those declarations that begin with NIIF_ are defined in there. Where should I include that header?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Specializing class
    By Elysia in forum C++ Programming
    Replies: 6
    Last Post: 09-28-2008, 05:30 AM
  2. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 02:03 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 03:39 PM
  4. class errors
    By romeoz in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2003, 08:57 PM
  5. Abstract class problem
    By VanJay011379 in forum C++ Programming
    Replies: 9
    Last Post: 07-31-2002, 02:30 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21