www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/08/12/05:21:07

From: anorland AT hem2 DOT passagen DOT se (Anders Norlander)
Subject: Re: Subclassing and a couple of other things
12 Aug 1998 05:21:07 -0700 :
Message-ID: <35D13531.CDEDFC84.cygnus.gnu-win32@hem2.passagen.se>
References: <003001bdc4fe$1df6e920$bbaeb6c2 AT kk5002 DOT kkhs DOT dk>
Mime-Version: 1.0
To: Simon Vilmer Pedersen <0507svp AT post DOT kkhs DOT dk>
Cc: gnu-win32 AT cygnus DOT com

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019