How an MFC Application can run as an service displayed in system tray and even this icon can be displayed on different login

Hi,

I want to develop one MFC Application which will run as a service and
should be displayed in a system tray icon.Since this Application is a
service it will keep running.so when i login through different user
this icon should be displayed there in the system tray.

I was partially successful in creating the MFC as a service and
displaying an icon,but if i do a log-off and log-in through different
account i can see the service is running in background but there is no
icon in system tray.Could any one help me in resolving this issuse.

Is there any API which i need to include in my code or just i have to
modify the existing code.

Please help me as soon as possible.


Thanks in advance
Regards,
Ankur

0
11/8/2006 3:49:49 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
611 Views

Similar Articles

[PageSpeed] 32

Here is the twist, your service itself shouldn't put the icon in the tray.
What you really have to do is create a seperate application that displays
the icon, and talks to the service.  Once you do that, you can put the new
app in the startup.

AliR.


"Ankur" <ankurjohar@gmail.com> wrote in message
news:1163000989.690382.287400@h48g2000cwc.googlegroups.com...
> Hi,
>
> I want to develop one MFC Application which will run as a service and
> should be displayed in a system tray icon.Since this Application is a
> service it will keep running.so when i login through different user
> this icon should be displayed there in the system tray.
>
> I was partially successful in creating the MFC as a service and
> displaying an icon,but if i do a log-off and log-in through different
> account i can see the service is running in background but there is no
> icon in system tray.Could any one help me in resolving this issuse.
>
> Is there any API which i need to include in my code or just i have to
> modify the existing code.
>
> Please help me as soon as possible.
>
>
> Thanks in advance
> Regards,
> Ankur
>


0
AliR3470 (3235)
11/8/2006 5:03:12 PM
Reply:

Similar Artilces:

A strange problem with MFC
Hi, Rencently I met a strange problem. The code like below: CWinThread* pThread = AfxBeginThread(ThreadFunc, (LPVOID)this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED); if(pThread->m_hThread != NULL){ pThread->m_bAutodelete = FALSE; pThread->ResumeThread(); } After the statement "pThread->m_bAutodelete = FALSE" executed, I found the value of pThread->m_hThread is 0. While pThread->m_bAutodelete is still 1! The code section located in a win32 static library, with /Md option.The host application(exe) is a win32 console application, with /Md option. There...

Formula to display nearest following Thursday in mm/dd/yyyy format
Hello, I have been reading and trying different suggestions here to no avail. What I need is a formula to calculate the nearest following thursday, and display it in mm/dd/yyyy format. To be clear, I have a column of varying dates. I need a formula to return the next thursday for each of those dates. To illustrate, say I have 05/22/2010, 05/23/201, 05/24/2010, & 05/26/2010 in cells A1 through A4. In cells B1 through B4, I would like to see 05/27/2010, 05/27/2010, 05/27/2010, & 05/27/2010 representing the following thursday. Thank you for your help! BW T...

Can't email links
Hey Group Customer has a problem: Windows XP Outlook 2002 10.3513-3501 SP-1 couldn't tell if Internet Mode or Corporate - it wasn't where I thought it would be (Help>About) He's on a web page and tries to send the link, Outlook message window opens, but says "This message has not been sent. Outlook blocked access to the potentially unsage attachment" then the url of the website We've checked all the security settings we can find, but still no joy. Can anyone help? James Dallas ...

How can i get a drawn object like a square to disappearina subgrp
I have a report where there is a sub group of data that may or may not be present. If it is present, i have a rectangle present as part of the report. i want the rectangle is disappear if there is no data for the subgrouping. Perhaps this will help? (I haven't tested it, so I really don't know). How to Shrink and Grow a Rectangle in a Report http://support.microsoft.com/kb/210321 Note: Disregard the "ACC2000:" in the official title of this KB article. Tom Wickerath Microsoft Access MVP https://mvp.support.microsoft.com/profile/Tom http://www.access.qbuilt.c...

Need a good service to defeat spreadsheet password
? TIA ...

How can I see "All programs" ?
I have some programs installed and I can see their folders in windows explorer and in my C drive, but when I open " All programs" from the start menu , they are not there. What I need to do so I can see all my installed programs when I open the Start/All programs menu? Natis Kyriakou wrote: > I have some programs installed and I can see their folders in > windows explorer and in my C drive, but when I open " All programs" > from the start menu , > they are not there. What I need to do so I can see all my installed > programs when I open the Star...

Same Database two different locations.
Anyone know of a way to say have a brick and mortar store with one database and two POS stations on RMS 2.0 and a third mobile laptop with internet access using the same database as the store with the same inventory and customers. Example: Some calls for a service call and you load up two items for the call. Go fix the problem with the two items, then while out in the field you use the laptop to write up and process the order with either an in house account or you take a credit card, check or cash in the field with internet and using the same database as the store's without using ...

Unicode in MFC
Hi, I am new to MFC programming and I have a problem: when I try to write the caption of a button or something else in my own language(Farsi), in the design mode it shows the correct string but when I compile it it shows a '?' instead of every character. Can anyone please help me with that. > I am new to MFC programming and I have a problem: > when I try to write the caption of a button or something else in my > own language(Farsi), in the design mode it shows the correct string > but when I compile it it shows a '?' instead of every character. Can > anyone ple...

Max size that pst can support
hi from the web, it mention 2GB, any one tested > 2GB without issue refer to http://support.microsoft.com/kb/832925 thanks The Unicode pst works great with larger files - what problem do you have with it... and is it the new Unicode format? The old format will not support larger than 2 GB. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net Outlook Tips: ht...

Money 2004: Transaction download run amok
Hi Everyone, I just upgraded to Money 2004 from Money 2003. While I was browsing through my file, Money just took off and downloaded over 700 transactions into my checking account. The transactions spanned aproximately the last year and the bulk of them were for Reconciled transactions that I had previously downloaded. (I download transactions from my back, Washington Mutial, every two weeks or so.) To make things interesting, the downloaded transactions also seem to have several duplicates and in at least one case, my Paycheck was entered but instead of creating a single entry, each individ...

return int value to OS in MFC App
Hi, Everybody. I have to make A MFC app to return int value to Operatiing System.. if i could use WinMain() function, this is not matter. but MFC does not reveal WinMain().... How can i solve this problem? Can Anybody help me with this problem? <flybluewing@bcline.com> wrote in message news:1189386249.923483.59250@y42g2000hsy.googlegroups.com... > Hi, Everybody. > > I have to make A MFC app to return int value to Operatiing System.. > > if i could use WinMain() function, this is not matter. > but MFC does not reveal WinMain().... > How can i solve this problem?...

how to make a stealth application
I would like to create an application that does not appear in the Windows Task manager and system Try or any other means that might detect its existance <mohsen_nouh@yahoo.com> wrote in message I would like to create an application that does not appear in the Windows Task manager --> this article may help you out http://www.codeproject.com/system/preventclose.asp and system Try -->Usually no app show there existence in System Tray ,you have to write code for making App ICON Visible in System Tray. or if you are talking about Window Taskbar :- Create Window with WS_EX_TOOLW...

can not open group contact folders in windows mail
not sure what has happened but as of today whne i try to openmy contact group i am asked with default program i need to open it with. so my 2 questions are : 1. why did this change 2. which default program will open my group contact thanks troy Open the Default Programs applet, which you can access either from the Start menu or via the Control Panel, then click the first item: "Set your default programs." After a few seconds, a list of programs comes up. Click on "Windows Contacts". If it doesn't respond with "This program has all its = defaults&...

Can Excel support active clip-art?
Hi. I'm hoping to use Excel 2002 as a spreadsheet to calculate a formula (nothing unusual there I know) but I would like to jazz it up a bit with some all-singing-all-dancing clip art such as Flash movies or something. Wondering if Excel does that or do I need a web page with a link to the spreadsheet? ...

How can I revise the default Outlook 2007 contact template?
I would like to see the Notes portion of the Template run horizontally on the bottom of the template as it did in Outlook 2000. It's not possible to make that change with a custom contact form without losing many of the other features of the main contact page. When you edit that page, it reverts to a very old appearance, without newer features like the person's thumbnail picture. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "seekjd...

mfc and IE activeX
I'm using VS 2003 and trying to use Internet Explorer in my MFC application but encountering problems If I built a very simple test dialog-application and drop in the IE it works exactly as expected. However, when I create a similar dialog box in my MFC application and call the ...DoModal() nothing appears at all - not even the dialog box itself. It's as if my application does not want to use ActiveX components - I also tried a couple of other Microsoft ActiveX controls and they have the same problem. I must be missing something obvious - any one with any ideas will be much ...

Visio 2000 Pro Service Release 1
Good day I'm seeking a download/cd of Visio 2000 Pro Service Release 1. Would you be willing to help me find one I'm student at Des Moines Area Community College (DMACC), Ankeny IA. I just bought a copy of Visio 2000 Pro and would like to add service pack 2 However, SP2 states SR1 MUST be installed first Thank yo Brad Is the copy you bought branded as Microsoft Corporation or Visio Corporation? If your box is branded as a Microsoft product, you already have SR1. -- Mark Nelson Microsoft Corporation This posting is provided "AS IS" with no warranties, and conf...

How can I find a median?
Hello, I want to find a median for team size with data that is currently set up in the following manner: Team size # of instances 20 3 9 1 8 2 Is there an easy way to convert the information so that I can use the median function? Thanks. I n Hello, Yes, there is: http://sulprobil.com/html/statistics_for_weighted_values.html Regards, Bernd =MEDIAN(8,8,9,20,20,20) -- Gary''s Student - gsnu200909 LisaB - You don't need to arrange the numbers. Just use the function: =MEDIAN(A2:A4...

Worksheet protection prevents Data Validation code from running...
I followed a tutorial to add a small bit of code to allow new items to be added and automatically sorted in validation drop-down lists. Here's the site with the tutorial: http://www.contextures.com/excel-data-validation-add.html#Top The code allows users to add new items to a list if it isn't already present in the data validation drop-down list. It then automatically sorts the list. Well it works great with an uprotected worksheet, but after I apply protection, the code won't run. I even tried checking all items in the sheet protection dialog box to see if one of t...

Need Help with MFC!!
Hi all, need help esp. with Graphic part. When you right click on any drive on your machine and click properties, you get a tabbed dialog. I want to know how can I embed graphic image (pie chart) into my MFC Dialog? I have written code which displays the Disk Usage right now but don't know how to display that info as a PIE CHART!!!!!! besides what type of MFC Dialog application should I look fwd to build? I want exactly as the DRIVE properties. TIA -- ======== Regards Vai ======== Have you looked at the CDC::Pie method? joe On Wed, 12 May 2004 23:07:11 -0400, "Vai2000"...

Bank not supported. What can be done?
Can anything be done if my bank is not listed in MS Money list? It is not american bank btw. -- Dmitry Korolyov [d__k@removethispart.mail.ru] MVP: Windows Server - Directory Services You can work with non-listed accounts, but you won't be able to use the integrated online stuff. If the bank offers downloads, then you may still be able to use them. Choose the 'this account is not listed' linkbutton when setting up the account -- Glyn Simpson, Microsoft MVP - Money http://money.mvps.org Check http://money.mvps.org/faq/default.aspx for tips and fixes for MS Money. To sen...

Can't access mailbox after move.
After moving a test mailbox I am unable to access it. My outlook client is configured correctly. The move log said everything went ok. What now? how long after the move did you wait? I find that after about 15 minutes, I can access it... "Doug" <Doug@discussions.microsoft.com> wrote in message news:27373073-83F0-4B87-AE4B-1EFFE6F53F21@microsoft.com... > After moving a test mailbox I am unable to access it. My outlook client is > configured correctly. The move log said everything went ok. What now? It's been a couple of hours now. I can see the mailbox in...

Auto Open macro not running when accessed through HTML link
I have created an excel workbook. Upon opening the workbook a macro runs. I have now created a HTML page with a hyperlink to the file. Upon clicking on the link the file opens but the autoopen macro fails to run. When I run the file direct the autoopen macro runs every time. Can someone please assist me with this. Thanks in anticipation Rhema ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ...

Can not send email through Outlook 2007
On same PC, I can not send email through Outlook 2007 but OE/Outlook 2003. Report error 0x800CCC92. Any suggestions are appreciated. Why can't you? Do you get a verbose error report other than the numbers? If yes, what is it? Have you used the test account settings? If yes, then what is the exact error that is reported? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, @@@_zidane_@@@ asked: | On same PC, I can not send...

You Can Delete a Closed MO
We are running GP Dynamics 10.00.1301 and discovered that an user can delete a closed MO from the Manufacturing Order Entry screen. This is how it happens. If you enter the MO #, no not hit [tab] then click Delete it deletes the MO. The Delete button needs some validation code. I’m going to open a ticket with Microsoft to report the bug. I'll keep you posted. i have seen this before and i dont see it as a bug, there is also an option on the routines section to clear, remove all closed MO's from the system The MO entry screen is used to create/update/delete open MOs not close...