morphological processing : Hit or Miss shape detection

I am currently looking at shape detection for Hit or Miss. I am having a bit of trouble with the concept of the window that they have you to detect the shape. Up till now reading about hit or miss they just give an example of a target set of pixels and a target image 1 and the step for this are as follows:

The first step in Hit-or-miss translation is the erosion of the image by the target configuration (shape), thus producing the hits. The logical operation is given by $$A\ominus B$$ where A is the image and B is the target shape to be found.

The second step, we take the complement of the image $$\bar{A}$$ and the target shape $$\bar{B}$$. The we erode the compliment to produce the misses with in the image. The logical operation for this is given by $$\bar{A}\ominus\bar{B}$$.

The final step take the intersection of the two eroded images and any surviving pixels give the location of the target shape in the original image A. The logical operation for this final step is given by $$(A \ominus B) \cap (\bar{A} \ominus \bar{B}$$).

Any surviving pixels give the location of the target shape in the original image A

However when I looked further into this method for shape detection I came across the following website:

and on slide 34 to 35 it has the following for shape detection

in there example for the shape detection they are using another structuring factor which they have named window, which it what I am having and issue with. with why have they done this? Is this a generally way when using hit or miss for shape detection?