Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Notify when form is created

Status
Not open for further replies.

javierbalk

Programmer
Feb 27, 2002
22
0
0
AR
Hi all:

I am making an ActiveX control and I need to be notified when a new form is created in the client application. Now I am subclassing the form where my ActiveX control is placed and I found that the WM_WINDOWPOSCHANGING message fires every time a new form appear, and then I look in the Forms collection every time I have this message in order to see if there is a new form, but it seems to be not sure, so I am looking for another message or a way to subclass the entire program and find a message that notify me about a new window. Any ideas?
Thanks in advance,

Javier
 
Hi javierbalk,

Try sublclassing the WM_NCCREATE message.

"The WM_NCCREATE message is sent prior to the WM_CREATE message when a window is first created."

Bye
LauDse
 
Set up a CBT hook. It will notify you if/when a new window is created.

LuCkY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top