Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] How can I capture WM_PARENTNOTIFY?

Methods like WM_PARENTNOTIFY and windowProc() only exist on Windows
and are part of the SWT implementation.  They don't exist on the other
platforms
so they can never be API (either public or protected).

The only way to get what you want is to write platform specific code,
either by
using the internal package org.eclipse.swt.internal.win32 (which is subject
to
change) or by writing C code.  If you subclassed (in the Windows sense) the
HWND that is the parent, looked for WM_PARENTNOTIFY in your window
proc and passed the the rest of the messages to the original window proc,
then you could get notification.  Again, this would mean either using an
internal
SWT package or writing C code to do this.

Steve



                                                                                                                                           
                      "jml" <jml@xxxxxxxx>                                                                                                 
                      Sent by:                        To:      <platform-swt-dev@xxxxxxxxxxx>                                              
                      platform-swt-dev-admin@         cc:                                                                                  
                      eclipse.org                     Subject: [platform-swt-dev] How can I capture WM_PARENTNOTIFY?                       
                                                                                                                                           
                                                                                                                                           
                      10/07/02 07:42 PM                                                                                                    
                      Please respond to                                                                                                    
                      platform-swt-dev                                                                                                     
                                                                                                                                           
                                                                                                                                           



Hi, all,
This is my first post, so please be kind.

I am learning swt, and playing with embedding the IE webbrowser into it. I
met a problem when the IE browser control trying to destroy itself (for
example, a window.close() is run by javascript). In this case, the IE
browser control will fire a WM_PARENTNOTIFY message, I need to capture this
event and dispose the container of the IE browser control.

My problem is I don't kow how to capture the WM_PARENTNOTIFY event. I read
the swt code for win32, and find in the Control.java class, there is a
windowProc() method dealing with windows messages, and calling a lot of
WM_*
functions. Unfortunately, windowProc() function is using the default access
level, and I can't inherit it in my sub-class.

Can anyone give me some hint how I can solve this problem?

thanks
jml

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev






Back to the top