Trapping the close message when sent from the task bar button

Hi, I am using a application that uses a Tray Icon. I need to make it 
behave like MSN Messenger. I am almost there and one of my remaining 
problem is that I can't see how to trap the "close application" message 
that is sent when the user right clicks on the task bar and chooses 
"Close", I need to hide my window in the case and I only want to be able 
to close my application by right clicking on the tray icon and choose "Exit"

Thanks a lot!


Simon
0
sguertin (27)
3/15/2006 3:18:34 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
521 Views

Similar Articles

[PageSpeed] 18

Reply:

Similar Artilces:

insert contact info in email message?
Is there some way to insert a contacts information into an email body? So if I want to give someones contact info to a client or friend while composing I can do that quickly. It seems as if I used to be able to do this in Outlook express. Does outlook do this too? I don't know of an easy and quick method, but a wordaround is to open the contact and use the File->Save As to save the data, then open it in an editor, copy, and paste into your e-mail. You could use the "Insert -> Item" menu and pick the contact but then it gets put into the e-mail as a .msg file attachment ...

How do I post a message to CDocument?
At the moment all ON_MESSAGE are handled in CMainFrame. I want to handle a message in CDocument but I can't get it to work. How is it done? Steve -- EasyNN-plus. The easy way to build neural networks. http://www.easynn.com Steve, > At the moment all ON_MESSAGE are handled in CMainFrame. > I want to handle a message in CDocument but I can't get it to work. > > How is it done? I don't know if this will help you, but you can recieve the message in CMainFrame then call a CDocument function to do whatever you want to do. You can access a CDocument object from wi...

closing a dialogue
hi, i've got a dialogue with some buttons on it. when the user clicks one of the buttons, i want the dialog to end / close or whatever you call it. how do i do this? Your question lacks detail. Is the dialog modal or modeless. I'm assuming it is modal as modeless requires some more knowledge. If the button you are pressing is not a IDCANCEL or IDOK, then you will probably want to use EndDialog() - Dave ...

Message Toolbar
My send and reply to messages does not appear when I highlight and read a message. Usually there's a toolbar on top to direct me. How do I get that toolbar to display when reading messages? ...

Limiting what is sent to Debug Output window
When running a VC6 app in the debugger and in debug mode, is there any way to define setting for what is and is not printed to the Output tab? There is a bunch of stuff like all of the First chance exceptions that I would rather not see in there. Thanks, -Mark ...

IE6 Message Rules
Folks: I am using Windows 2000 and Outlook Express 6. I am trying to include AUDIO capability into the message rules. As we know, to create a simple message rule we go to Tools >> Message Rules >> Mail.... To create any particular rule, the following ACTIONS are available for selection: Move, Copy, Delete, Forward, Highlight with color, etc Note that the NONE of the actions (in OE6) include any AUDIO reaction. This is the problem I would like to solve. Basically, I would like to play some audio file as the ACTION to be taken when a specific message gets ...

VLookup VBA error trapping
Can anyone tell me how to modify this formula to trap errors? I tried wrapping it in IsError (code) Then...but it doesn't work. Public Sub RunMeNow() Dim i As Long Dim iLastRow As Long With Sheets("Sheet2") iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 3 To iLastRow 'iLastRow to 1 Step -1 .Cells(i, "B").Value = Application.VLookup( _ .Cells(i, "A").Value, Range("RegionGrouping"), 2, False) Next i End With End Sub Or any other way I can handle an error with this type of pr...

trapping LVN_ENDSCROLL
Hi there, I'm trying to trap the LVN_ENDSCROLL notification in my parent, but don't seem to get it. Here's what I have. In my parent's header: void OnLvnEndScroll(NMHDR *pNMHDR, LRESULT *pResult); In the source: void CSKListCtrl::OnLvnEndScroll(NMHDR *pNMHDR, LRESULT *pResult) { Invalidate(); UpdateWindow(); *pResult = 0; } In the message map: ON_NOTIFY(LVN_ENDSCROLL, WM_QUICKLIST, OnLvnEndScroll) where WM_QUICKLIST is mapped to my child's ID. What am I doing wrong? Thank you. Well since I couldn't find a way of trapping LVN_ENDSCROLL, I just used the HSCROL...

"no available printers" or disabled "OK" button in print dialog...
I'm running Vista 64 with Office Professional Plus 2007. All my other apps, including Excel & Word print without any problems. When I attempt to print with publisher, I get an error box telling me that there are no printers installed. I shut down publisher, restart it, and then I can get to the "Print Setup" or "Print" dialogs. All of my printers are there, but no matter which I select, the "OK" button or "Properties" buttons are disabled. Thoughts? Dell? 2007 Office program may stop responding when you try to print a document http:/...

Can message be directed to file folder and recipient at the same t
Trying to send message to person x and at the same time have it filed in another folder other than the "Sent" folder. Is it possible to do this? Yes it is! Click on the Options button in that email and under Delivery Options there should be a checkmark to "Save Sent Message to" and you'll see that the default displayed is Sent Items. Click the Browse button and select your folder from the list. -- K. Orland Such as are your habitual thoughts, such also will be the character of your mind; for the soul is dyed by the thoughts - Marcus Aurelius "Jimp...&quo...

Custom POS Button font size?
Is there any way to customize the Custom POS Button font size and possibly the background color of the buttons? I know how to change the image, what the text says and the width of the buttons but that is it. I know I can create an image with the font I want but it still shrinks the image and text too far. Our dealer did this for us; we have a coffeebar in our retail store and their buttons on the POS screen are all customized. (looks like a rainbow really) Just contact your dealer, they'll be able to tell you. (so yes it is possible) "Rob F." <RobF@discussions.micro...

Outlook does not close when exited out of
Whenever I close out of Outlook 2000, it tells me "Please wait while Microsoft Outlook Exits" and Outlook never quits. I have to go into the Task Manager and kill the outlook task. Does anybody else have the same problem? Lakshman. Hi Lakshman I am having the same problem. I am using Outlook 2000 SP-3(9.0.0.6627) on Windows 2000. Did you find solution to your problem Sunitha Lakshman <hlokku@hotmail.com> wrote: > Whenever I close out of Outlook 2000, it tells me "Please > wait while Microsoft Outlook Exits" and Outlook never > quits. I have to go into...

CFtpConnection : connection closed by the server
Hello everybody, I have a little FTP client, using CFtpConnection, and I have a problem : I connect to the server, then perform some operations, but after a given time, the server close the connection. I tried to detect it using OnInternetStatusCallback, and INTERNET_STATUS_CLOSING_CONNECTION, but this function isn't called neither when I close the connection myself nor when it's the server that close the connection. The function is called for other events, like connection, receiving data, but not on this event. I does not understand. Please help me. If you have some working code, I w...

OL2003 retrieves sames messages over and over again
I just upgraded from OL2K to 2003. I pull my mail from a comcast pop server. Each time I do a send/receieve it pulls the same messages even if I had read them. I have my settings set to leave messages on server for 2 days in case I need to see them from the web client when I am not hom. OL2K never did this. Am I missing something...at this rate I will have like 10 copies of each message in my inbox. HELP!!!!! Can you turn on diagnostic logging (see http://support.microsoft.com/default.aspx?scid=kb;en-us;Q300479) and post the OPMLog.log file (preferably as an attachment) after you've do...

Mooving messages from .ost file to mailbox
Hi All, Tonight I have broke my .edb file of my Exchange 2000 Server Storrage group and lost all my client messages ! I haven't backup ! The good news is that all the Clients has OL2003 wit .ots file The thinks I make was : 1. Create new mailbox store 2. Delete old Clients boxes 3. Create new Client boxes in new store The Question is: Can I move messages from .ots file to mailbox directly The way I do this , is: 1. OL2003 is in offline mode 2. Create pst file 3. Copy from ots to pst 4. OL in online mode 5. Copy from mst to mailbox !!! Thanks !!! t wrote: > Hi All, > > Tonigh...

Lost Send Button
I use outlook xp. I lost my send button. I have looked at the toolbar menu I can't find a way to put it back on the toolbar. Also there is an account button that was not there before. Thanks On the Outlook toolbar, right click and choose customize. Click th commands tab. Scroll down under categories and find standard. On th right side scroll down and find send/receive. Left click on that an hold your mouse button and drag it back to the toolbar. You can get ri of toolbar buttons by dragging them into that window ----------------------------------------------- ~~ Message posted fro...

Trapping errors
How do write a piece of code that traps VBA error messages and ignores them? See my post on 22/07/07 about an Automation error message Thanks Tony Take a look at what Allen Browne has at http://www.allenbrowne.com/ser-23a.html -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Tony Williams" <tw@invalid.com> wrote in message news:uWKdkqVzHHA.5992@TK2MSFTNGP02.phx.gbl... > How do write a piece of code that traps VBA error messages and ignores > them? > See my post on 22/07/07 about an Automation error message > Thanks >...

Forwarding Sent Email
Hi, I am trying to find a function in Exchange Server 2003 which can allow a department's manager to be able to automatically receive a copy of email that his/her department's staffs sent. Unfortunately, I cannot locate this function in Exchange. If such option available, can someone tell me where to find it in Exchange? or else, is there any 3rd tools I can use to accomplish this? Thanks. On Fri, 12 Jan 2007 22:21:00 -0800, Alice <Alice@discussions.microsoft.com> wrote: >Hi, > >I am trying to find a function in Exchange Server 2003 which can allow a >departm...

Closing a dialog window
how to close a dialog window when OnInitDialog passes and all controls on dialog are initialized? Regards, Mystique SendMessage(WM_CLOSE); could u explain some more please? "Aids" <A.Tsurkan@gmail.com> wrote in message news:1134981644.532209.167030@g44g2000cwa.googlegroups.com... > SendMessage(WM_CLOSE); > In the end of onInitdialog, send message SendMessage(WM_CLOSE); or in the handler WM_SHOWWINDOW SendMessage(WM_CLOSE); this too will work. CDilaog::DestoryWindow(); you also might want to have a look at CDialog::EndDialog() "Shark" <vivekun...

Trapping for keystrokes...
Is there a way I can write a little program that will trap the keyboard and save whatever is being typed to a file? In other words, I need to write something that will run in the background but will be able to know whatever is typed on the keyboard and then save those keystrokes to a file on the hard drive. Thanks, Fred A keyboard hook. joe On Tue, 30 Sep 2003 03:41:26 GMT, "sftwrdvlpr" <bogus@news.com> wrote: >Is there a way I can write a little program that will trap the keyboard and >save whatever is being typed to a file? In other words, I need to write &g...

disdappearing messages in Inbox
All of a sudden my inbox emails are disappearing. After I read it, it goes away. In fact, all my inbox emails I have had for 4 months have dissappeared. I have subfiles and they are not dissappearing only the Inbox. I scanned my hard drive for a virus, and it did detect. It was deleted. It was an incoming email. I rebooted and still I have the disappearing act. ?They disappear 6 seconds after they arrive even if I don't read them. whatttttzzzz happnen Should I reinstall Outlook? I also have another problem. When I have a plain text email sent to 20 people it hangs up and sends t...

If this newsgroup closes June 1, which forum covers .NET Framework
If this newsgroup closes June 1, which forum covers .NET Framework? b11_ wrote: > If this newsgroup closes June 1, which forum covers .NET Framework? You can just switch to a real NNTP server, other than Microsoft's. Microsoft has no way to actually "close" a newsgroup. All they can do is stop hosting it on their own servers. Pete I can hear the folow-on questions already - what is an NNTP server and how do I find one that also has these newsgroups? "Peter Duniho" <no.peted.spam@no.nwlink.spam.com> wrote in message news:OfYnyi3$KHA.4308@T...

Receiving Duplicate Messages
Hi, I recently tried to set up Outlook Express on a 2nd computer. Since that time I am receiving duplicate messages from senders. How can I stop receiving dual messages? Thanks, Todd Have you configured this connection (presumably to a POP3 server) to "delete" messages on the server after download? If you, should to stop the duplicates. However, this in confict to have OE running on a second machine where presumably you want to have duplicate mails. That's what IMAP servers were invented for ... If you can use than protocol instead of POP3, then do so. Hope this i...

Hyperlinks dont work I get a message "Cannot download the info..
None of hyperlinks in my PPt 2007 presentaion work I get the massage "Cannot download the information you requested" when I try to activate the links. I cant find anything in PPT 2007 help about this. In article <2DA5A2AD-97F2-48AD-B23E-96A7CCF26C8B@microsoft.com>, Etienne 67 wrote: > None of hyperlinks in my PPt 2007 presentaion work I get the massage "Cannot > download the information you requested" when I try to activate the links. What do the hyperlinks point to? ============================== PPT Frequently Asked Questions http://www.ppt...

Error message et.dll
Using Outlook 2003 with Win XP I keep getting the following error message "the add in et.dll cannot be installed or loaded The problem may be resolved by running detect and repair". I have run detect and repair twice, but the error box keeps reappearing. Once the box is closed, Outlook seems to be functioning properly, but the message is annoying. Any help would be most appreciated. Roger Delete the addin by going to Tools, Options, Other, Advanced Options, Addin Mgr. Many thanks, no more error messages. Roger >-----Original Message----- >Delete the addin by going to ...