473,757 Members | 10,263 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Relationship between a window and its associated taskbar button

Hi,

This is really just a theoretical question for my own interest, and not for
any nefarious purpose... :-)

Say we have three applications running - Notepad, Wordpad and Excel - and
each window is in its "normal" state i.e. not maximised, and not minimised
to the taskbar.

We click each of the three taskbar buttons in turn and, of course, the three
applications receive focus one after the other... We click on the Notepad
taskbar button, and Notepad receives focus. Obviously!

Similarly, if we click each of the applications in turn, their associated
taskbar button appears indented, i.e. as if it has been clicked.

My question is, how does Windows relate an application to its associated
taskbar button? I.e. when you click on Notepad, how does Windows "know"
which of the taskbar buttons to indent? I'm assuming it must use a hWnd...?

Assuming it does, is there any way to discover an application's taskbar
button's hWnd from the hWnd of the application itself?

Any assistance gratefully received.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 30 '08
10 2512
"Ben Voigt [C++ MVP]" <rb*@nospam.nos pamwrote in message
news:78******** *************** ***********@mic rosoft.com...
http://msdn.microsoft.com/en-us/libr...80(VS.85).aspx
WS_EX_APPWINDOW
Forces a top-level window onto the taskbar when the window is visible.
Now here's the question: does the LACK of this flag always PREVENT a window
from displaying on the task bar?

What messes with me is the use of the word "force." "Force" suggests to me
that "sometimes apps MAY appear on the taskbar without this flag, but using
it ENSURES that the app will display on the taskbar." See what I mean about
the wording?
Oct 31 '08 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2194
by: Juan Garcia | last post by:
Subject says it all. Given: Window A with text field. Window B with a button (onClick opens Window C) Window C with a button (onClick I want it to modify text fields of Window A) I have tried storing the handle of Window A ( var winHandle = this; ) in a global variable/file ( globals.js ) and then accessing it from
18
9824
by: D Witherspoon | last post by:
I developed this module, examples on the internet seem to be much longer.. Can someone explain to me why my solution doesn't work? Module modAPI Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
4
3382
by: google | last post by:
Hi there, I've searched high and low for this, but it seems most people are looking to establish (and control) the relationship between a parent browser window and it's associated child window created with window.open. I would like to break this connection. Why? Because there is an application that I want to open in a new window, but no matter what I do it will close the window and redirect the original (parent) window to its location...
29
5025
by: wayne | last post by:
Hey there... I'm having some problems passing url parameters with an open.window command. I'm not terribly familiar with java script but here is the code below. When executed it opens the window properly but does not pass the parameter. (this is part of a coldfusion template) <a href="##"
8
7435
by: Andante.in.Blue | last post by:
Hello, I have just inherited a legacy Access 97 database. While going through it, I noticed something strange... its Relationships window (the one accessed by Tools --> Relationships) is almost empty. Now, as I ponder how a relation database could work without any relationships, I noticed that the queries of the database defined some relationships between the source tables and queries. Which leads me to the question, what is the...
4
4391
by: Blaine | last post by:
Does anyone know how I can hide a form from the TaskManager? I've set the ShowInTaskbar to False, but when using Alt-TAB to switch between applications, it appears as a blank icon. I can set it as a SizableToolWindow, but then I no longer have the minimize button on the caption. Is there a way to mimic a (FormBorder) sizable tool window (so it doesn't appear in the tasklist) and still show the Min, Max and Close control buttons? (Or...
4
7214
by: Hutch | last post by:
I also un-checked all of the check boxes in the database's Startup options menu. I then added a button to the form so that the user can close the database, and another button so that the form can minimized. I made the minimize button so that when it was used, something would show-up on the taskbar and not on the desktop (above the Start button). I figured the users would get confused when they had multiple windows open and couldn't find the...
3
10257
by: Andrew Poulos | last post by:
There's a HTA application that's running on a local computer (not from a URL) and the user can open a new HTML window by clicking a button The first time the user clicks the button the window opens. Any subsequent click causes this dialog, with this error, to appear: "Error: The remote server machine does not exist or is unavailable" The relevant code is
3
8755
by: BlackShadow33p1 | last post by:
I'm trying to write a program in C++ that gets the handles of all the visible entries in the windows taskbar. The method I've used so far is to send the TB_GETBUTTON message to the taskbar. Supposedly the window handle for an entry is in the dwData structure in the TBBUTTON structure but I'm having a hard time retrieving the handle from the structure correctly. It seems when I look at the data I've retrieved, it is not a handle (negative...
0
9489
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9298
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10072
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7286
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6562
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5172
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2698
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.