Thread: A C Tray Program

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    36

    Lightbulb A C Tray Program

    Hi,


    I want to write a simple C program which shows a set message, for say, "Hi!" every hour. In order for this program to be in running state, I want it to go to the System Tray of the Windows Taskbar so that is continuosly running.

    Further, to enchance this program we can get it executed when Windows starts up.

    Can anybody demonstrate how to achive that? I'm sure somebody will come up with an example!

    Cheers!

    Dev.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    A web search would probably find an example (or 10) as well.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    36
    I have come across an example but it is meant for C#

    Link: http://www.codeguru.com/csharp/.net/...icle.php/c6933

  4. #4
    Chinese pâté foxman's Avatar
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    404
    This should go in the Windows section.

    Here's what you are looking for if you want to do it with the Win32 API: http://msdn.microsoft.com/en-us/libr...59(VS.85).aspx

    If you don't have a lot of knowledge with the Win32 API, it might be easier to do it using a .NET language, like C# or VB .NET. Then, this is what you would look for
    http://msdn.microsoft.com/en-us/libr...otifyicon.aspx

    As for launching the program when your computer start, well, start by writing your application and then just do a quick search on the internet and you'll find out.
    I hate real numbers.

  5. #5
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    When searching for solutions related to WinAPI it doesn't matter what language you stumble on because every function is used in the same way in any language. For example, I use a WinAPI VB reference which has prooven very useful, but I program in C.
    Again, people, use google:
    http://www.delphitips.net/2007/06/16...windows-start/ - Autorun
    http://www.codeproject.com/KB/shell/systemtray.aspx -Tray
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  2. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  3. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

Tags for this Thread