Hi,
I have been trying to implement a taskbar icon into my application. I'm trying to use the class I found here. I so far just have the dialog show up, and create a CSysTrayIcon object. That's all. However, when I compile I get these errors:
I have the platform SDK installed. Can anyone tell me what's wrong? Thanks.Code:1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(43) : error C2504: 'CWnd' : base class undefined 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(45) : error C2143: syntax error : missing ';' before 'public' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(45) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(45) : warning C4183: 'DECLARE_MESSAGE_MAP': missing return type; assumed to be a member function returning 'int' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(64) : error C2146: syntax error : missing ';' before identifier 'LRESULT' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(66) : error C2146: syntax error : missing ';' before identifier 'GetMouseScreenPt' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(66) : warning C4183: 'GetMouseScreenPt': missing return type; assumed to be a member function returning 'int' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(110) : error C2061: syntax error : identifier 'CMenu' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(111) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(112) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(113) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(114) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(115) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(116) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(117) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(118) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(119) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(120) : error C2061: syntax error : identifier 'CPoint' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\time watcher.cpp(4) : error C2248: 'CSysTrayIcon::CSysTrayIcon' : cannot access protected member declared in class 'CSysTrayIcon' 1> c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(106) : see declaration of 'CSysTrayIcon::CSysTrayIcon' 1> c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(85) : see declaration of 'CSysTrayIcon' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\time watcher.cpp(4) : error C2248: 'CSysTrayIcon::~CSysTrayIcon' : cannot access protected member declared in class 'CSysTrayIcon' 1> c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(107) : see declaration of 'CSysTrayIcon::~CSysTrayIcon' 1> c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\systrayicon.h(85) : see declaration of 'CSysTrayIcon' 1>c:\documents and settings\michael\michael's documents\visual studio 2008\projects\time watcher\time watcher.cpp(13) : warning C4060: switch statement contains no 'case' or 'default' labels 1>Build log was saved at "file://c:\Documents and Settings\Michael\Michael's Documents\Visual Studio 2008\Projects\Time Watcher\Debug\BuildLog.htm" 1>Time Watcher - 21 error(s), 3 warning(s)