This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Subclassing and a couple of other things
- To: Simon Vilmer Pedersen <0507svp at post dot kkhs dot dk>
- Subject: Re: Subclassing and a couple of other things
- From: Anders Norlander <anorland at hem2 dot passagen dot se>
- Date: Wed, 12 Aug 1998 08:24:49 +0200
- CC: gnu-win32 at cygnus dot com
- References: <003001bdc4fe$1df6e920$bbaeb6c2@kk5002.kkhs.dk>
Simon Vilmer Pedersen wrote:
>
> Hi all.
>
> I am experimenting a bit with window subclassing, in specific subclassing the window of the IRC program mIRC from another program. But I cannot seem to get it to work like in the SDK.
> First I get the hwnd of the window, with FindWindow("mIRC",NULL)
> and it returns the proper hwnd.
> But when I then call orgWinProc = (WNDPROC)SetWindowLong(hwnd,GWL_WINPROC,(LONG)WinProc)
> it returns NULL, and a test with GetWindowLong shows that the above command had no effect.
> But GetLastError returns 0. Anyone who can help me with this?
You cannot subclass a window in another process in WIN32.
This is because the processes have different address
spaces.
/Anders
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".