How do I minimize to the trey

I have a requirements to put an icon of my app in the trey when it is
minimized. How would I do this.

1. From a console app.
2. From an MFC dialog app?

Thanks,


0
7/24/2003 5:50:13 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
636 Views

Similar Articles

[PageSpeed] 51

Yes, an MFC dialog app. All Dialog apps, if I remember 
correctly, come with an App.ico file. You can draw on 
this or replace it with your own. If you replace it, then 
you may need to find how it links with the code and make 
sure your file is used instead.

Not sure if you can override the icon of a console window.

>-----Original Message-----
>I have a requirements to put an icon of my app in the 
trey when it is
>minimized. How would I do this.
>
>1. From a console app.
>2. From an MFC dialog app?
>
>Thanks,
>
>
>.
>
0
7/24/2003 6:04:38 PM
On Thu, 24 Jul 2003 12:50:13 -0500, Berto wrote:

>I have a requirements to put an icon of my app in the trey when it is
>minimized. How would I do this.
>
>1. From a console app.
>2. From an MFC dialog app?

The API you need is Shell_NotifyIcon. There is sample code for using
this (there's at least one gotcha you need to know about with popup
menus from a tray icon) here :

www.mooremvp.freeserve.co.uk/Win32/framed_tip001.htm

If you want classes, I think codeproject and codeguru have them.

-- 
Bob Moore [WinSDK MVP]
http://www.mooremvp.freeserve.co.uk/
(this is a non-commercial site and does not accept advertising)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not reply via email unless specifically requested to do so.
Unsolicited email is NOT welcome and will go unanswered.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0
bobm (116)
7/24/2003 7:33:22 PM
Reply:

Similar Artilces:

How do I minimize to the trey
I have a requirements to put an icon of my app in the trey when it is minimized. How would I do this. 1. From a console app. 2. From an MFC dialog app? Thanks, Yes, an MFC dialog app. All Dialog apps, if I remember correctly, come with an App.ico file. You can draw on this or replace it with your own. If you replace it, then you may need to find how it links with the code and make sure your file is used instead. Not sure if you can override the icon of a console window. >-----Original Message----- >I have a requirements to put an icon of my app in the trey when it is >mini...

Minimized Outlook
I was glad to discover that I could minimize Outlook to an icon at the right of my task bar instead of to the standard big minimize bar. At least, until I found out that half of the time when I click on it to expand it, I get a ! message telling me that Outlook is not responding. I suppose that's a function of my Exchange server. But having to click again slows things down. Is there a way to disable this message and maximize Outlook quickly? Howard Brazee <howard@brazee.net> wrote: > I was glad to discover that I could minimize Outlook to an icon at > the right of my ta...

Minimized form
Hi, I have a big issue with Acces 2007,whne i open a form,the window is always minimized,i try to set the property "Auto resize" to yes,but when i open the form it's minimized as usual and displays one record only unless users scroll down the bar to see the records one by one... Is there any solution for this? What I did ( Access 2003 though ) was to put a macro with the command Maximize in the form onload event "Pietro" wrote: > Hi, > I have a big issue with Acces 2007,whne i open a form,the window is > always minimized,i try to set the proper...

How to add "minimize" button for the dialog
How to add "minimize" button for the dialog - that is - the little "x" on the top right of the window? In resource editor, right click on the dialog and click properties. In styles tab, you will find the option "System Menu". Check it in your case. ------- Ajay Kalra ajaykalra@yahoo.com I am sorry. I also want minimize, that is "-" on the top right of the window How to add it by using code? This option (minimize box) is also available in the styles tab. -------- Ajay Kalra ajaykalra@yahoo.com Play with GetSystemMenu of your dialog and remove...

Minimize
I can minimize the whole program, but I can not minimize the file itself, the minimize button for the file is not there, what do I do? THanks S Hi Shawn Your Workbook is protect with Windows Checked Tools>Protection.....Protect Workbook -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Shawn" <anonymous@discussions.microsoft.com> wrote in message news:0f9b01c3932e$360a9df0$a401280a@phx.gbl... > I can minimize the whole program, but I can not minimize > the file itself, the minimize button for the file is not > there, what do I do? &...

Minimize??
For some reason when I click on Minimize the window still takes up the full screen. Obviously I've changed something. How can I restore it back to where the full screen is not used? Thanks, Doug Do you mean minimise which is the leftmost icon, or do you mean the one in the middle which takes it from full screen to a smaller screen. Assuming it is the latter, hit that and then manually resize your window to the size you want. After that it should alter to this size when you hit the icon. -- Regards Ken....................... Microsoft MVP - Excel S...

how do i minimize/maximize a workbook from vba? I want to minimize it durring processing to speed things up a bit
how do i minimize/maximize a workbook from vba? I want to minimize it durring processing to speed things up a bit Record a macro when you do it manually (either the worksheet window or the application window). But I never thought that minimizing stuff would make the macro work faster. But there are some other settings that can make your code work faster: Application.ScreenUpdating = False CalcMode = Application.Calculation Application.Calculation = xlCalculationManual ActiveSheet.DisplayPageBreaks = False The first stops the screen flickering when you select different s...

working minimized
can anyone tell me if there's a way to close the outlook and have it run minimized on my notification area (area where the clock and volume control is located) instead of my taskbar. what i'm trying to do is leave my outlook running checking my email account constantly but not have it minimized on my taskbar but only have an icon on the notification area. thank you all! lukas What version of Outlook "Lukas Beltrame" <lukasob@yahoo.com> wrote in message news:072b01c3d413$97a388d0$a301280a@phx.gbl... > can anyone tell me if there's a way to close the outlo...

Minimize all applications...
Hello NG, I want to have my application to be alone on the screen. If other applications are open, I want them to be minimized (normal applications have this opportunity, I won't pay attention to the ones that do not have it...). Do you know, how I can broadcast a Minimize-SYSCOMMAND to all windows (instead of my own)? Thanks for help, Guido ::SendMessage(HWND_BROADCAST,...) would do this. But why do you want to remove control from the user? This sounds like a Really Bad Idea. Only the end user should have control of what is on the screen. joe On Wed, 16 May 2007 17:58:33 +0...

How to minimalize window?
Function CMDIFrameWnd::MDIMaximize maximalize child window in MDI. How to minimalize this window? You should be able to do it by using ShowWindow(SW_SHOWMINIMIZED) on the child frame itself. --- Ajay Stefan Gutten wrote: > Function CMDIFrameWnd::MDIMaximize maximalize child > window in MDI. How to minimalize this window? ...

Minimizing Outlook
How do I apply the following settings, when I minimize outlook 2007 it does NOT stay on my staus bar but rather in the icon tray? Thanks "heshie" <heshie@discussions.microsoft.com> wrote in message news:A823326A-9342-4382-8604-75212FA98E05@microsoft.com... > How do I apply the following settings, when I minimize outlook 2007 it > does > NOT stay on my staus bar but rather in the icon tray? Right-click the icon in the system tray and either check or uncheck "Hide When Minimized" as you wish. -- Brian Tillman [MVP-Outlook] Thats the way it works, wh...

Clicking link minimizes Excel
Hi, This may be a really newbie question, but I haven't been able to find the solution on my own and am hoping someone here can help. Whenever I click a link to a Word document that exists within an Excel 2000 spreadsheet cell, Word opens as expected. When I'm done with Word and close it, I find that my Excel window has been minimized. I find this behavior to be quite annoying and am wondering if there's anything I can do to maintain my pre-click Excel window status. Thanks. Mark I'm not sure that this applied to xl2k, but I think with xl97, you could make a minor ...

Slow Restore after Minimize
I keep Outlook minimized but running during the work day. When I click the minimized icon in the taskbar to restore Outlook, it takes 36 SECONDS for it to become operational. We are running off an Exchange Server. My machine is running Outlook 2000 on Windows XP, 1.8 gig P4 processor, 512 RAM. I've done all the usual things, deleted cookies and temporary internet files, updated & scanned for viruses, updated and run Ad-aware to get rid of spyware. Two of our IT people have tried several things but couldn't help. This is really hurting my productivity. HELP! Thanks for an...

Minimize access windows
Hi everybody, I want to minimize the access windows and have my forms only in modal popup way, with the main forms always on the background. I just found and copied a module (see below) that does it well except for a small side effect. I have some "animated" buttons/labels (e.g. change font size/colour/picture etc. on click/mouse move events) on a secondary form and, after an on click event, the access window get back. Running the same command (e.g save record and close secondary form) from a simple button created by access toolbox (no focus on it), everything works an...

No minimize button
I changed over from Office 2000 to Office 2002. When I open some excel files the speadsheet has no close or minimize buttons. Also this happens in word on some documents on a different machine. MK No buttons or just "grayed out"? If no buttons, could be the workbook(s) are protected. If just "grayed out", could be you have GroupWise loaded. If that's the problem. See this MSKB article http://support.microsoft.com/default.aspx?scid=kb;en-us;260199 Article is specific for 2000 but I think it is valid for other versions. It gives a workaround (use the file...

Minimized Emails?
For some reason, when I click on my individual emails in Outlook express, the email is minimized and appears at the bottom of my screen. I then have to manually maximize each email in order to read it. How can I set it up to always open my emails in a maximized fashion? (It used to do this, but for some reason they are now all minimized.) Thanks for any help you can offer me. Tony Ask in an Outlook Express forum. This is an Microsoft Office Outlook forum. Outlook Express is family of Internet Explorer and Outlook of the Office family. Here is the link for the right forum http://communi...

Open then minimize a form before a report opens
I have a "Deposit Detail" report which pulls data from the "Deposit detail" table based on the Settlement date which is entered in a "Choose Settlement date for report" form. I want to have Access work it so when I open the "Deposit Detail" report, the "Choose Settlement date for report" form opens before the report, allows the user to enter the date they want for the report, minimizes the Choose Settlement date form, then opens the Deposit Detail report, which will then detail all Deposit Details for the Settlement date chosen. I tried ...

OL2K3 -- Exit when minimized?
Got an interesting one here on just ONE of the machines I manage. :) Whenever the user clicks to minimize their instance of Outlook 2003 it vanishes -- the GUI exits out although the process is still running in the background. If he reboots his box, he'll be prompted to empty the deleted items folder and all but he is not able to access the application (alt-tab, etc.) and it does not list in Applications (under Task Mgr.) only under processes. Naturally, double-clicking the icon brings it right up of course but that's a bit inconvenient. Any suggestions? James are you sure it&...

Minimize to systray?
Is there a way to minimize outlook 2003 to the systray? I hate taking up the space on my task bar just so I'll know when I have spam. Do you see an Outlook Icon in the Systray if you do right click on it and select "Hide when Minimized". "Keith LeLievre" <anonymous@discussions.microsoft.com> wrote in message news:0b8401c3d531$07289600$a401280a@phx.gbl... > Is there a way to minimize outlook 2003 to the systray? > > I hate taking up the space on my task bar just so I'll > know when I have spam. ...

minimize restore
Hi I minimize my outlook but i cant restore it unless i right click and maximize it. I double click the icon on the minimized bar and it just sends a flash to the top left and back to the bar. Has anyone seen this? If you have and have a solution plz replay to my post or email me at Odinlives@hotmail.com ...

Restoring minimized window
When a user clicks on a minimized window on the taskbar, the application automatically restores the window. How is this done programatically? More specifically, how do you capture the event that a user has clicked on your minimized window and how do you restore the window. Thank you > When a user clicks on a minimized window on the taskbar, the application > automatically restores the window. How is this done programatically? More > specifically, how do you capture the event that a user has clicked on your > minimized window and how do you restore the window. > To handle t...

Minimize Outlook
Is it possible to get Outlook 2007 to start minimized? Have you tried the same way you start anything minimized? Right click on the shortcut you use and choose it in Properties. It will appear as an icon on the right in the Notification area of the Taskbar. Double click on that icon to open. "J" wrote: > Is it possible to get Outlook 2007 to start minimized? J- All you have to do is put a new DWORD entry into the registry... Add the DWORD entry 'MinToTray' in HKEY_CURRENT_USER/Software/Microsoft/Office/12.0/Preferences After you add the entry, modify it and set ...

excel minimized?
I am trying to find an answer to an issue with one of my teachers and I have no idea how to help. When she gets an excel attachment in email (AOL) sometimes it opens maximized and other times it minimizes to the task bar. XP OS. Any help appreciated, thanks in advance. -- Thanks,, Kim Hello When a file is saved in Excel on one computer, information on the size of the window and cell location is saved with it also. When the file is reopend it will return to the window size it was last saved under. My guess is that when a file is sent to another computer, there could be different s...

How to Minimize on to tray
Hey! Does anyone know if there is a registry fix (like for OutLook 2002) to minimize OutLook 2000 on to the system tray? OR any other way without installing another program to do it. Thanks. Any help 'll be appreciated. no. -- Diane Poremsky [MVP - Outlook] http://www.poremsky.com - http://www.cdolive.com Outlook Tips: http://www.outlook-tips.net/ Expert Zone http://www.microsoft.com/windowsxp/expertzone Search for answers: http://groups.google.com Most recent posts to the Outlook newsgroups: http://groups.google.com/groups?as_ugroup=microsoft.public.outlook.*&num=30 "Sa...

Detect Child Window minimize, maximize, restore, etc...
hi, it's possible to a parent( CMDIFrameWnd ) window determine that a child window(CMDIChildWnd) have become minimized? thanks for all the help valente You need to handle WM_SYSCOMMAND in the CMDIChildWnd derived class. Something like :- void CChildFrame::OnSysCommand(UINT nID, LPARAM lParam) { // TODO: Add your message handler code here and/or call default if(nID == SC_MINIMIZE) { GetParentFrame()->PostMessage(...);//notify parent frame } CMDIChildWnd::OnSysCommand(nID, lParam); } -- Regards, Nish [VC++ MVP] http://www.voidnish.com http://blog.voidnish.com "jmvale...