How can I control the application bar color (active state)?

Hi all,

     When a Windows application lost focus, it's title bar will become 
gray(in WinXP).
     I have  twin process application�� I hope one process has focus, the 
other process' title bar is still blue.

     I don't want to draw the title bar myself. Is there any flag I can 
control to maintain the blue state when user focus come to any process of 
mine?


    Thanks in advance to anyone who can help!
 


0
John
5/11/2010 6:49:43 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
633 Views

Similar Articles

[PageSpeed] 5

On May 11, 8:49=A0am, "John Smith" <ta...@126.com> wrote:
> Hi all,
>
> =A0 =A0 =A0When a Windows application lost focus, it's title bar will bec=
ome
> gray(in WinXP).
> =A0 =A0 =A0I have =A0twin process application=A3=AC I hope one process ha=
s focus, the
> other process' title bar is still blue.
>
> =A0 =A0 =A0I don't want to draw the title bar myself. Is there any flag I=
 can
> control to maintain the blue state when user focus come to any process of
> mine?

Bar drawing the title yourself, I don't think so.

But note: the whole purpose of title bar colors (which of course
aren't necessarily blue/gray on XP and are certainly not that on Vista
+) is to inform the user what top-level window has focus. You seem to
want to break that. Why do you want to break the way your user's
machines work? These are not your machines, you can't do what you want
with them.

Instead, you should perhaps say why you want to do that (or better
yet, what you really want). Perhaps there's some less nefarious way to
get that.

Is it that that you want your user to notice that there are other
related windows to the one that has focus? You could do that e.g. by
blinking some UI element on them when you change focus.

But please don't break normal system mechanics on a whim.

Goran.
0
Goran
5/11/2010 2:38:29 PM
"John Smith" <tap05@126.com> wrote in message 
news:uNEBkYN8KHA.1888@TK2MSFTNGP05.phx.gbl...
>     I don't want to draw the title bar myself. Is there any flag I can 
> control to maintain the blue state when user focus come to any process of 
> mine?
>

I don't recommend doing this, as your users are sure to complain about your 
non-standard app causing them confusion, but technically use Spy++ to see 
which windows messages your frame (topmost) window gets when it loses focus. 
I believe it receives WM_ACTIVATE, WM_KILLFOCUS, etc.  If you handle those 
and don't forward them to the base class, then perhaps your title bar won't 
be redrawn.

-- David
 

0
David
5/11/2010 4:46:07 PM
Reply:

Similar Artilces:

Can You Tell Me Which Microsoft Certification is the most popular nowdays
Recommend Microsoft certificatons : * Exchange Server 2007 * MCAD.NET * MCDBA * MCDST * MCITP * MCP * MCPD * MCSA * MCSA 2003 * MCSD.NET * MCSE * MCSE 2000 Security * MCSE 2003 * MCSE 2003 Managing * MCSE 2003 Security * MCTS * Microsoft Business Solutions * Microsoft Licensing exam * Microsoft Partner Competency exam * Microsoft Windows Vista, Configuring * Office SharePoint Server 2007 * TS * Windows SharePoint Services 3.0 Which Microsoft Certification is the most popular, get the answer in http://...

I can't back space more than one character or repeat a character,
I was prompted while filing out a form to have duplicate key strokes stopped. I made the mistke of accepting and now I can't type any dupe characters without difficulty (must pause momentarilly) and I can't back space without the same pause. I also cannot find how to disable the thing. This happens in all typing situations, including here. You've probably enabled FilterKeys, one of the Accessibility Options. You can turn it off in Windows Control Panel and at the same time disable the shortcut key that you pressed to enable it. -- Suzanne S. Barnhill Microsoft M...

can you print envelopes from money ??
I find it really silly that I can't print envelopes from money. I have client information stored for sending invoices or quotes, yet I can't use the address details to print directly on to an envelope or label. Why can't I get a download to add the option along with customised invoices, quotes etc etc. Does anyone know a quick and easy way to do this other than coping and pasting each individual client address into word. Then selecting print envelope. This way is quite time consuming when you have to print a lot. cheers Silly or not, a search of the archive for this new...

Graphics and attached file in e-mail activity / quick campaigns e-mails
Hi. We have migrated from Siebel to MS CRM 4.0. We are happy with the decision, but very disappointed by the default options on e-mails, especially e-mails in quick campaigns: - Graphics cannot be inserted, e.g. a company logo - A file, e.g. a PDF, cannot be attached Can anyone help with a workaround, or any tips on a third party add-on / tool that can expand the functionality in CRM? We have tried deferent workarounds: - Export the targets e-mail addresses to Excel. Design the e-mail in Word, and send the e-mails from Word via the Excel list merge. That solves the graphics issue, but...

Where should I look for commercial MFC gui control packs?
I tried at http://www.programmers.com/ but choice was not that big. Any help appreciated. What do you mean by a GUI control pack? Something like this: www.codejock.com AliR. "Darko Miletic" <kiklop@fibertel.com.ar> wrote in message news:uDLpHmQGJHA.6132@TK2MSFTNGP04.phx.gbl... >I tried at http://www.programmers.com/ but choice was not that big. > > Any help appreciated. Note that with Visual Studio 2008 C++ Feature Pack (or more recently with VS2008 Service Pack 1), MFC classes were "revamped", with ribbons, etc. You can see some screenshots abou...

Can't open many XLS files at once
I have Excel 2000 and Win XP pro. I used to be able to highlight many XLS files in Explorer, right click, choose open and all the highlighted files would open in Excel with the different xls files on my task bar. I can still do this on my W98 computer, but I can only open one file at a time on my Win XP computer. If I double click on a 2nd XLS file the 2nd XLS file opens and the first file closes. I tried the run excel.exe /regserv fix but this did not solve the problem. Does anyone know how to fix this for Win XP? Thanks Dennis Hi maybe: Tools - Options - General and uncheck 'Ig...

Active sync problem in wince5.0 when de-activate "Enable KITL" in release mode
Hi, My Usb fucntion driver with active sync support in wince 5.0 is working fine with de-activate "Enable KITL" support in debug mode. By de-activate "Enable KITL" in RELEASE mode, active sync is not working. Any idea ? Regards - D. Does it work if you Enable KITL in a release build? Do you have ActiveSync included in your release build? What are you using as your default USBF client? Check your COM ports, the COMx x number may have changed. -- Bruce Eitman (eMVP) Senior Engineer Bruce.Eitman AT Eurotech DOT com My BLOG http://geekswithblogs.net/brucee...

Moving mailboxes using Active Directory Users and Computers
This is a multi-part message in MIME format. ------=_NextPart_000_0022_01C61DC8.6FAD4950 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Question: When moving mailboxes using AD Users and Computers from = Exchange server A to Exchange Server B, what will be the effect on users = that currently have their mailbox open in Microsoft Outlook? Some of the = users have Outlook 2003 and some of them have Outlook 2002. Is it best = to do the move when noone is on? but the thing is in this organization, = we have so laptop users that may not be on...

Can't Click on Links in E-mail Messages
Starting today, whenever I click on a link in an e-mail message, the following box pops up: This operation has been canceled due to restrictions in effect on the computer. Please contact your system administrator. Does anyone know why this is happening, and what I can do to fix it so that I can click on links? -- Brett Hi Brett, The following Knowledge Base (KB) article addresses the issue that you are having. Please follow the steps outlined in this article and this should resolve your issue. http://support.microsoft.com/default.aspx?scid=KB;EN-US;307818 Regards, Scott Atkins MCSE,...

How I can print full text bigger than column, in repeat column
When I print statements with repeat columns in excell which have text bigger than repeat columns, complete text is printed on all sheets except first sheet. How I can overcome this problem? I want to print complete text in repeat columns, which is expanded to other columns which are blank. ...

Can't change default print resulotion in Publisher 2003
In Publisher 2003, I tried to change the print quality via the "Printer Properties" dialog box, but that didn't change the print resolution. I clicked "Advanced Print Settings..." in the print dialog box, but the only drop-down choice next to "Resolution" is "Default," which doesn't say what the default is but seems to be set at Super-fine. How do I cange the print resolution to Normal or Draft? Thank you. Don Burgess <DonBurgess@discussions.microsoft.com> was very recently heard to utter: > In Publisher 2003, I tried to change...

Removing Campaign Templates and Template Activities from default v
I am trying to figure out how to prevent template activities and campaign templates from showing up in default views in the "Activities" section of CRM as well as the "Advanced Find" and "Regarding" views. ...

in Excel: How do I change "selected cells" highlight color?
When I select cells in Excel the shading is so light (blue) that I can barely tell which cells are selected from those that are not. Can I change the background color of cells that are selected? Thanks. Assuming Excel 2007 this is a known problem and as yet no patch for it. I don't have Excel 2007 but I have read that playing with your Contrast can help some. Gord Dibben MS Excel MVP On Tue, 10 Jun 2008 12:51:00 -0700, flameretired <flameretired@discussions.microsoft.com> wrote: >When I select cells in Excel the shading is so light (blue) that I can barely >tell whic...

How to make A1 the active cell in all visible worksheets ?
This is a multi-part message in MIME format. ------=_NextPart_000_0028_01CA8164.76257740 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ......so that when i activate the sheet A1 is the cell in the upper left = corner of my screen. Thanx ------=_NextPart_000_0028_01CA8164.76257740 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; ...

Can Money Deluxe 2006 Read Money Premium File
Can Money Deluxe 2006 read/write a Money Premium 2006 file? Thanks. Bob Mc. In microsoft.public.money, Bob Mc <Bob Mc@discussions.microsoft.com> wrote: >Can Money Deluxe 2006 read/write a Money Premium 2006 file? Yes. ...

database application
Hello, I ve created a windows form application with access db I use 16 tables. For each table are created datatable, dataadapter, binding navigator and so on.... I have seen that application becomes really heavy and slow during the creation of code( editing ) Which is the best way to make all fast and not heavy? if my database use a table with 1 millions of records, which way is the best? thanks "eusclide" <eus@me.it> wrote in message news:eMnQr17iKHA.5520@TK2MSFTNGP06.phx.gbl... > Hello, I ve created a windows form application with access db > I ...

CFtpFileFind::FindNextFile() can't get the correct file name.
Once I want to get file from HP-UX by FTP. I use MFC CFtpFileFind to find the files under a specified directory in HP-UX, but the return value of CFtpFileFind::GetFileName () is not the correct file name, it includes time (sometimes and date) ahead, such as: 19:30 Mydemofile001.txt 19:35 Mydemofile002.txt but the real file name existed are only Mydemofile001.txt and Mydemofile002.txt. Is there any problem in the low level encapsulated by MFC for FTP list files? Could anyone give me some advice? Thank you. ...

Reinstate scroll bar
The right side scroll bar on my Outlook Express e-mail Inbox window has disappeared. How do I get it back? This is a group to support Outlook from the Office group of programs. Outlook Express is a part of Internet Explorer and is a quite different program despite its similar name.. You will probably get a faster and more expert answer if you post this to an outlook express news group. Try posting in one of these newsgroups: microsoft.public.windows.inetexplorer.ie5.outlookexpress for OE 5.x microsoft.public.windows.inetexplorer.ie55.outlookexpress for OE 5.5x microsoft.public.windows....

Sorting by Color #2
Hello, Is it possible to sort in excel by color for entire row. Thanks, Manish hi, Manish ! > Is it possible to sort in excel by color for entire row. IF you mean the 'real/complete' entire row... some changes [minor I hope] has to be made.. this is 'the long way'... [trying you to provide 'only' a specific range including titles which are not sorted] the following macro will use the 'next' column for sorting numbered_colors... hth, hector. Sub Color_Sorting() Application.ScreenUpdating = False Dim myRange As String, n_Cols As Byte, n_Rows As Long...

Can't copy comments between spread sheet
I can't copy the cell comments from one sheet to another. All other formating gets copied. Try copy then paste special and select comment! Cheers John "Plan Schedule" <planschedule@yahoo.com> wrote in message news:4b4f01c4801d$c40befa0$a401280a@phx.gbl... > I can't copy the cell comments from one sheet to > another. All other formating gets copied. ...

how can I change the a,b,c, column headers in excel to names
I've tried and can't figure out how to change the column header from a,b,c, etc. to names for each column. Any tips are appreciated You can only show A,B,C...,IV or numbers: 1,2,3,...,256 But you could put your names in Row 1 and then select A1, then select A2 and click on Window|Freeze panes. espray wrote: > > I've tried and can't figure out how to change the column header from a,b,c, > etc. to names for each column. Any tips are appreciated -- Dave Peterson ...

I can't print in publisher
We have just has a new photocopier / printer / scanner / facsimile machine installed, and we can print everything out fine - except in publisher. When I open a publisher file and go file / print and select the printer, it just comes up with an error message, and shuts down any advice would be very helpful e-mail :- admin@bestbusinessbuys.co.nz Thanks Nick What is the error? Try this, open the Printer folder, set some other printer as default, the Generic Color PS printer will do, open your file, print, select your new printer. Does the file print okay? Publisher saves printer settings w...

Excel Version When Posting Please State Your Excel Version!!!
On Jan 8, 6:58=A0pm, "Tyro" <T...@hotmail.com> wrote: > Subject: Excel Version When Posting Please State Your > Excel Version!!! And Please Include Your Questions and Comments In the Body of Your Posting!!! Not just in the subject line, even if it simply duplicates the subject line. Some news readers truncate the subject line. Some news servers do not permit you to reply to articles with empty bodies. Some news servers seem to reject such articles when they come in from the network, or perhaps the originating news server does not push them into the network. That ...

Background color #2
Using Visual C++ 6.0 Writing MFC dialog based. I set the background color by putting SetDialogBkColor(RGB(170,170,150)); into the project's .cpp file right at the ::InitInstance() This works fine, however; I got to thinking if there was a way change the background color at some point while the application is running rather than when it was initialized? Would I still use SetDialogBkColor() or some other function? "Frank" <franknospam@nospam.net> wrote in message news:uWEJJ80ZGHA.4612@TK2MSFTNGP03.phx.gbl... > Using Visual C++ 6.0 > Writing MFC dialog based. &g...

Can't Install Money 2006 SB on Vista
I'm trying to install Money 2006 Small Business on my new Vista Computer and it keeps crashing during the install process. I had it on another computer and upgraded to Vista and it ran just fine. Any Ideas? In microsoft.public.money, srazook wrote: >I'm trying to install Money 2006 Small Business on my new Vista Computer and >it keeps crashing during the install process. I had it on another computer >and upgraded to Vista and it ran just fine. Any Ideas? For Money 2006 make sure this Vista update in installed: http://support.microsoft.com/kb/929427 Be sure that you...