From: John Smith on 11 May 2010 02:49 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!
From: Goran on 11 May 2010 10:38 On May 11, 8:49 am, "John Smith" <ta...(a)126.com> wrote: > 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? 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.
From: David Ching on 11 May 2010 12:46 "John Smith" <tap05(a)126.com> wrote in message news:uNEBkYN8KHA.1888(a)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
|
Pages: 1 Prev: Copy constructor Next: Web Browser Control and OnMouseWheel Event (Zoom on Mouse Wheel + Ctrl) |