Show Window

I am currently developing a MFC SDI application. I want to integrate a
tray icon with it. When the application is minimized it hides by
ShowWindow(SW_HIDE) and then when double clicked on tray icon shown by
ShowWindow(SW_SHOWNORMAL).

But the problem is if some other application is activated after my
application is minimized, ShowWindow shows it but it's behind some
screen. I have tried with SetFocus didn't work.

Please help me to solve this problem.

Thank you.
Varuna

0
varuna82lk (25)
11/15/2005 1:17:10 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
1630 Views

Similar Articles

[PageSpeed] 29

Try BringWindowToTop.

----
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6842)
11/15/2005 1:26:05 AM
In addition to Ajay's idea you can also use SetForegroundWindow().

Tom

<varuna82lk@gmail.com> wrote in message 
news:1132017430.344711.172240@g14g2000cwa.googlegroups.com...
>I am currently developing a MFC SDI application. I want to integrate a
> tray icon with it. When the application is minimized it hides by
> ShowWindow(SW_HIDE) and then when double clicked on tray icon shown by
> ShowWindow(SW_SHOWNORMAL).
>
> But the problem is if some other application is activated after my
> application is minimized, ShowWindow shows it but it's behind some
> screen. I have tried with SetFocus didn't work.
>
> Please help me to solve this problem.
>
> Thank you.
> Varuna
> 


0
tserface (3861)
11/15/2005 3:39:00 PM
Thanks I will try it.

0
varuna82lk (25)
11/16/2005 2:14:53 PM
Reply:

Similar Artilces:

How do you restore the Shapes window after closing it?
When you first open Visio, the Shapes selection window is on the left hand side. If you click on the X in the upper right hand side of that window to close it, how do you get it to reappear? Just open any stencil from Files \ Shapes \ xxx "bearden65" <bearden65@discussions.microsoft.com> wrote in message news:93BAE663-B49D-4333-8F17-1DFE8D4C9CF8@microsoft.com... > When you first open Visio, the Shapes selection window is on the left hand > side. If you click on the X in the upper right hand side of that window > to > close it, how do you get it to reappear? ...

Resize Window Scrollbar
Hi All, I'm trying to figure out if there is a way to change the size of a window's scrollbar. I'm trying to do this to a ListBox's vertical scrollbar, so that I can put a gripper on the bottom right. Here is an example: (though the example isn't a listbox, i did this in Paint) http://www.learnstar.com/alir/gripper.jpg Any ideas? AliR. Maybe this article will help you: http://www.codeproject.com/useritems/grippie.asp Tom "AliR (VC++ MVP)" <AliR@online.nospam> wrote in message news:GTCHh.1736$uo3.907@newssvr14.news.prodigy.net... > Hi All, &...

Using MFC windows functions to make a childclass database view cor
I am trying to open a database view which is derived from CWnd. The view is initially several columns too far to the right. I can actually (temporarily, when stopping at breakpoints in the debugger) get it correct--set to the left, by using the ScrollWindow function with a positive argument [in this case +350 pixels] . This positive argument is to me counterintuitive since I would expect a negative number so that the text would move to the left, but I suppose scrolling could work either way. In any event, I tried using RedrawWindow, Refresh, ActivateTopParent, UpdateWindow, and even R...

report showing oldest inventory
Is there a report that will show an "aging summary" for inventory items? MP, How about the Item Movement Report? -- * "MP" <MP@discussions.microsoft.com> wrote in message news:ED41EC49-4C04-4EA9-A712-6BB48EA29BEA@microsoft.com... Is there a report that will show an "aging summary" for inventory items? Yes, thanks. I just hadn't explored that report enough to notice that I could filter by last received date. "Jeff" wrote: > MP, > > How about the Item Movement Report? > > -- > * > "MP" <MP@discus...

windows mail
My windows mail is not working, it will not let me send out any messages and this just started today, I was able to send out messages a couple days ago. Can anyone give me any suggestions as to what the problem may be? Thanks Diana, This newsgroup deals with Microosft Acccess, a relational database application. Your best bet is to try a newsgroup that deals with your particular email program. (Outlook? OutlookExpress?) -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll neve...

Outlook 2000 & Windows 7 compatibility??
Just got new computer w/Win7, still using Outlook 2000...waiting to upgrade in July when Office 2010 is released.. 'Only' able to Receive Emails, but cannot Send or do a number of other things in Outlook.. Plus each time I go out of it & then back in, it gives me the Outlook 2000 Startup window?? Would appreciate anyone who can give me their experiences or fixes for this same thing. Thanks! Try turning off User Account Control (UAC). Other than that, I wouldn't use anything less that Office/Outlook 2007 on Windows 7 as you still may end up with some compatibil...

List privilege for install, start and stop service on Windows Serv
Hi, Could you help me to find answer for following question please? I need to give rights to one of developers for service installation, starting and stopping. I would like to avoid giving him administrator privileges. Is any way to achieve the goal? This article may help. http://technet.microsoft.com/en-us/library/cc782435(WS.10).aspx -- Regards, Dave Patrick ....Please no email replies - reply in newsgroup. Microsoft Certified Professional Microsoft MVP [Windows] http://www.microsoft.com/protect "Piotr" wrote: > Hi, > Could you help me ...

address in TO line: show name instead of email address
When I compose a message in Outlook, the addresses in the TO line that I have picked from a list are shown as email addresses. (For example I type "pat" and push check names or send and the computer shows me various patricias and pattersons for me to choose from.) I am used to and prefer the way they were shown in Outlook Express, as the name associated with that email address. Can I get Outlook to do this? Some addresses are autocompleted and those show up as both name and address, which is fine. Susan Using Outlook 2003, SP2. You can change the Display Name to whatever ...

Publisher Slide Show
I have created several publisher documents and I want to put them together in a slide show, how do I do that? Its not anything that is being published to the web, its strictly for a presentation. Should I use PowerPoint and if so... how? Confuzzed wrote: > I have created several publisher documents and I want to put them together in > a slide show, how do I do that? Its not anything that is being published to > the web, its strictly for a presentation. Should I use PowerPoint and if > so... how? Publisher is for creating published publications, and PowerPoint is for ...

Clipboard content window
Hi I am now using Excel 2003. Unlike excel 2000 , while I am performing copy - pest functions the Clipboard window appears intermitantly on right of spreadsheet. Which I find quite disturbing while working on a spreadsheet. How do I disable this window display ? Shanks Hi. Bring up the Office Clipboard with Edit | Office Clipboard... At the lower-left corner of the Clipboard window, there is an Option button. I like the option to bring up the window by hitting Ctrl+C twice. HTH -- Dana DeLouis Win XP & Office 2003 "Shanks" <Shanks@discussions.microsoft.com> wrote...

print account to show monthly balances
what are the settings to print an account that will show all tranactions (expense and income) as well as each month's balance. this balance also show the difference each month as to income or loss. i printed it off once but now it will not do it thanks russ ...

Page header only show up on page two of access report
Can you make the page header only show up on the pages two and on in an Access report? David Add code to the Format event of the page header as follows. Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer) Me.Section(acPageHeader).Visible = Me.Page <> 1 End Sub -- John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County .. "gumby" <gumbysolutions@cox.net> wrote in message news:1194380528.229082.244150@z9g2000hsf.googlegroups.com... > Can you make the pag...

Window pops up on new mail
Outlook 2002 When new mail arrives to the inbox/deleted items, Outlook will become the new 'front' program. In other words if i have I.E. open Outlook takes it's place. How to stop? do you have the latest service packs? does the whole program take focus or just the alert dialog? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Search for answers: http://groups.google.com Most recent posts to the Outlook newsgroups: http://groups.google.com/...

Emails from publisher show box when cursor placed on text
I'm using Publisher 2003 and sending the document using the "Send E-mail" option, then clicking on "Send this page as Message." When the email is received, a window opens when the recipients cursor is placed over the text. The windows shows text taken from the e-mail. I do not want this window to open as it's distracting. In some cases, the window is rather large. I can't help think this is an option, but I would like to turn this off. Anyone else have this problem or a resolution. Thanks...... Bill ...

Bitmaps of CBitmapButton not showing
Greetings, I am trying to use CBitmapButton with four bitmaps but it is not working. The button shows up, but not the bitmaps. When I set the control's style to BS_OWNERDRAW as it has been suggested then the bitmaps still don't show..but also what used to be the button now becomes a flat grey area on the screen. CWnd* parent = CWnd::FromHandle(this->m_hWnd); BOOL success = m_BitmapButton.Create(_T("work!"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_OWNERDRAW, CRect(0,0,100,100), parent, IDC_PLAYSECTIONBUTTON); success = m_BitmapButton.LoadBitmaps(IDB_PLAYSECTION...

Windows Media Player (v. 11 vs v. 12) seek bar
hi all, I am creating a website and testing the video streaming, more specifically, the ability to "seek" back and forth within the videos. "Seeking" works beautifully if the client is Windows 7 with Media Player 12 however if the client is XP with Media Player 11, the "seeking" does not work at all. The XP computer is a brand new install with the latest patches, Media Player, etc. Is there something in Media Player 12 that allows "seeking" vs Media Player 11? thank you, Cos On Wed, 24 Feb 2010 22:42:01 -0800, Cos <Cos@discuss...

Credit Card Account Payments do not show in Budget
Hi, Having an issue with money where the regaular bill payment to credit card accounts are not showing up in the Advanced Budget. All accounts have been included in the budget. There are payments from my transaction account going to the two credit cards and these payments will not show up in the budget. The payments have a Special category of Credit Card Payments : Account Name. Any help would be much appreciated. Regards Steve See thread for a very similar subject from sometime in the past two days. Credit Card Payment is Transfer in drag. "sjn" <sjn@discussions.microsoft....

Showing Attachment Icons on Printed E-mail Messages
When I attach documents to an Outlook 2000 e-mail message icons of the attachments are showing on the bottom of the message. But when I print the message the attachments icons do not show. How do I get those Icons to show on printed e-mail messages ? Where is the Box I have to Check ON for that to happen ? Either print in Plain Text or use an add-in for this; http://www.sperrysoftware.com/Outlook/Print-On-Demand.asp?Source=RS If you decide to order use "BH93RF24" to get a discount -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outl...

How do I install Windows Fax & Scan on my Vista Enterprise machine?
This article states I can do this but doesn't explain how? http://www.microsoft.com/windows/windows-vista/features/fax-scan.aspx Windows Fax and Scan Windows Fax and Scan is on the main All Programs menu of the Windows Vista Business and Windows Vista Ultimate editions. It can be installed as an optional component in Windows Vista Enterprise. Windows Fax and Scan enables you to perform all faxing and scanning tasks and manage all of your faxes and scanned documents from one location. "Artreid" <artreid44@hotmail.com> wrote in message news:e82VBVX8K...

How to read in a binary formatted file and parse the contents and populate a listview window?
Just as the subject states...Pretty new to this stuff... ReadFile works. File::Read works. fread works. Define "parse". Any introductory book on C programming, including the venerable K&R book, tells how to do this. Your problem statement is far too vague to make it possible to give a concrete example. Also, don't put messages in the headers and then refer to the header. Most newsreaders truncate the amount of the header that is visible. joe On 29 Jun 2006 13:02:46 -0700, Perry.Moa@gmail.com wrote: >Just as the subject states...Pretty new to this stuff... J...

Please verify BUG in Microsoft Windows XP/2003 Accessibility *MPS* #2
Hello, The Problem (Multi Processor only): This occurs when there is MORE than one Logical/Physical CPU on the system. When a console winevent hook function is active, changing the codepage of a console window causes the console window to not respond. I set a hook using SetWinEventHook to get notified on events EVENT_CONSOLE_CARET to EVENT_CONSOLE_END_APPLICATION all is well, events are coming. When I open a CMD window and change the codepage to a different codepage than the default one, the window stops responding. >From my tests it appears that the problem is somewhere in the SetCo...

Worksheet several pages, Want name to show up on each page
Ok I am creating a worksheet that is several pages long, on each page it has name and other information, How do i set up my sheet so that I only have to enter this information once? In EXCEL 2007:- - Page Layout - Page Setup - click on the arrow in the lower right hand corner - Header / Footer tab - Custom Footer (for example) - enter information in the:- Right section: (lower right hand corner) - OK - OK Print Preview / and the information that you entered should appear in the lower right hand corner of your Worksheet. You can customize...

How do I get my send button to show
I can create a new message but can not send it, as I do not have a send button on screen. I went to help and it suggested maybe I do not have an account so I tried to set one up but do not have the right connection in the tool area. Can someone please help. I use MS Office Outlook 2003. Send button will show up after you correctly set up your account in Tools, email accounts. Get your POP server settings from your Internet provider. Outlook is not used for free Web mail like Yahoo or Hotmail. "maddie" wrote: > I can create a new message but can not send it, as I do not ...

Count fields and show 1 or 0
OK guys, I have another problem I will post here and on another post if nobody reads this. I have the same 5 (A2:E2)fields, each with a 1 or 0. What I need this time is that If A2 is 1, then I need A2 plus any 2 (1or true) of the remaining four (B2:E2), to them have the new field box called total to read 1 or true. If A2 is 0(false), then regardless of the other four, the Total field must read 0 or false. Does this make sense? Thanks again! Hi In your Total box =IF(A2=0,0,IF(SUM(B2:E2)>=2,1,0)) -- Regards Roger Govier <slagg7575@hotmail.com> wrote in message news:1157315724....

Outlook
Error Message: "The action cannot be completed. The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action." This is displayed when trying to set up Outlook with Windows 7. It works perfect with XP using the exact same settings. What version of Microsoft Outlook are you using? "Outlook/Windows 7/Exchange" <Outlook/Windows 7/Exchange@discussions.microsoft.com> wrote in message news:55FEE65B-92CB-48F1-B3B8-C8276E2875DA@microsoft.com... > Error Message: "The action cannot be completed...