At the moment, I think, inferring from your posts, that you have a single CWnd window, and then you are telling each IVideoWindow where to position itself on that window i.e.
pseudocode
vidWindow[0..3]->put_Owner(*this);
vidWindow[0]->SetWindowPosition(0,0,50,50);
vidWindow[1]->SetWindowPosition(50,0,50,50);
vidWindow[2]->SetWindowPosition(0,50,50,50);
vidWindow[3]->SetWindowPosition(50,50,50,50);
vidWindow[0..3]->put_MessageDrain(*this);
this means you can't determine which video window is telling you about a click
If you create a child CWnd window for each IVidWnd you have more chance to work out what's happening
again, pseudocode
class ChildVideoWindow : public CWnd
{
public
Create(IVideoWindow *vw, RECT &where, UINT id, Cwnd *parent):m_id(id)
{
Create(WC_STATIC, "", ws_child | ws_visible, where, parent, id);
vw->put_Owner(*this);
vw->put_MessageDrain(*this);
}
void OnLButton(UINT flags, Point where)
{
GetParent()->SendMessage( WM_LBUTTONDOWN, MAKDWORD(flags,m_id), MAKEDWORD(where.x,where.y);
}
protected:
UINT m_id;
};
ChildVideoWindow childVideos[4];
childVideos[0..3].Create(vidWindow[0..3],rect0..3,0..3, this);
ParentCWnd::OnLButton(UINT flags, Point where)
{
int videoWindowThisMessageCameFrom=HIWORD(flags);
....
}