Current location: Hot Scripts Forums » Programming Languages » C/C++ » C++ Windows System tray and alerter


C++ Windows System tray and alerter

Reply
  #1 (permalink)  
Old 01-02-08, 07:41 AM
scott2500uk's Avatar
scott2500uk scott2500uk is offline
Coding Addict
 
Join Date: Apr 2006
Posts: 275
Thanks: 2
Thanked 2 Times in 2 Posts
C++ Windows System tray and alerter

I currently have a small program that runs in the background and polls a mysql database and if new entries are found it uses Microsofts MessageBox feature. This is very plain and can get annoying and become in the way of using the pc.

So ive decided to go with changing my program to sit in the system tray and alert with messages like msn does by doing that sliding window thing :S.

Ive found lots of examples to do all this but my problem arises when in the example programs they use an include:

Code:
#include "stdafx.h"
This stdafx.h goes on to include more:

Code:
#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxdisp.h>        // MFC OLE automation classes
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>			// MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
Im using Dev-CPP and also tried using Microsoft Visual C++ 2008 express edition. Main reason because they are free. I cant compile any of the demo programs because i dont have all these header files. Ive searched and searched but just cant find these set of header files anywhere. It seems to me that they are included in some microsoft build somewhere but I dont know where.

Can anyone point me to where i need to be able to compile these demo programs?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 01-02-08, 09:14 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Try turning off pre-compiled headers. This way you might not need stdafx.h.
Reply With Quote
  #3 (permalink)  
Old 01-02-08, 07:03 PM
MrDoom MrDoom is offline
Newbie Coder
 
Join Date: Oct 2007
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
It turning off pre-compiled headers doesn't help, you might want to try this link:
http://msdn2.microsoft.com/en-gb/vstudio/aa700755.aspx
Reply With Quote
  #4 (permalink)  
Old 01-03-08, 04:09 AM
scott2500uk's Avatar
scott2500uk scott2500uk is offline
Coding Addict
 
Join Date: Apr 2006
Posts: 275
Thanks: 2
Thanked 2 Times in 2 Posts
The thing is that all the demo scripts that i have found use the pre compiled headers. if i remove the stdafx.h from the projects then the test scripts wont compile because a lot of stuff must be missing....

http://www.codeguru.com/Cpp/COM-Tech...icle.php/c1335

^^ im using the above demo script

Last edited by scott2500uk; 01-03-08 at 04:17 AM. Reason: add content
Reply With Quote
  #5 (permalink)  
Old 01-05-08, 04:32 PM
MrDoom MrDoom is offline
Newbie Coder
 
Join Date: Oct 2007
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by scott2500uk View Post
The thing is that all the demo scripts that i have found use the pre compiled headers. if i remove the stdafx.h from the projects then the test scripts wont compile because a lot of stuff must be missing....

http://www.codeguru.com/Cpp/COM-Tech...icle.php/c1335

^^ im using the above demo script
Well in that case, try this:
http://msdn2.microsoft.com/en-gb/vstudio/aa700755.aspx

Express Editions of Visual Studio do not come with the necessary files to compile Windows apps which may explain your errors.
Reply With Quote
  #6 (permalink)  
Old 01-08-08, 02:30 AM
scott2500uk's Avatar
scott2500uk scott2500uk is offline
Coding Addict
 
Join Date: Apr 2006
Posts: 275
Thanks: 2
Thanked 2 Times in 2 Posts
MrDoom when i go to that link and try and download it takes me to 2008 express.

I have 2008 express installed plus the SDK. Where do I go next?
Reply With Quote
  #7 (permalink)  
Old 01-08-08, 11:20 AM
XIII XIII is offline
New Member
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
use normal win32, mfc sucks. You can make irregular windows and move it up and down to look like a msn popup, but if you're looking for headers, goto http://koders.com
Reply With Quote
  #8 (permalink)  
Old 01-08-08, 11:36 AM
scott2500uk's Avatar
scott2500uk scott2500uk is offline
Coding Addict
 
Join Date: Apr 2006
Posts: 275
Thanks: 2
Thanked 2 Times in 2 Posts
thanks for the input XIII but im looking to use the example I've found as they are perfect for what I'm looking for. I have been on koders.com and downloaded lots of header files. Ive lost count of how many but no matter how many I download each header seems to include another whihc in turn includes some more. It was an endless battle.

Im currently downloading VS2008 Pro Trail and hoping it will allow me to compile the test programs. If this does work I will get the business to pay for a license.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 04:39 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.