subclassing a MFC subclassed window 
Author Message
 subclassing a MFC subclassed window

Hello,
I'm trying to subclass a listview in a executable that call my dll.
From within the dll I call SetWindowLong function in order to subclass
the listview. To get the listview handle I use FindWindowEx function
(looking for "SysListView32" class name). Once I've got the window
handle I make a call to SetWindowLong to set the new procedure for the
listview. I know for sure that the listview is subclassed via MFC in
the App executable. What I get after calling SetWindowLong is a wrong
behaviour of the listview (the original subclassing doesn't work
anymore).
Is it possible to subclassing an MFC subclassed window? Any
suggestion?

Thanks.



Sat, 15 Nov 2003 00:59:58 GMT  
 subclassing a MFC subclassed window
Yes it can be  done. There is an excellent class appropriately named,
CSubclassWnd in MSDN/MSJ. Search for that in MSDN and there are few examples
along with it. All source can be downloaded from www.microsoft.com/msj.

--
Ajay Kalra [MVP - VC++]

Note: Please post all replies to newsgroup only.


Quote:
> Hello,
> I'm trying to subclass a listview in a executable that call my dll.
> From within the dll I call SetWindowLong function in order to subclass
> the listview. To get the listview handle I use FindWindowEx function
> (looking for "SysListView32" class name). Once I've got the window
> handle I make a call to SetWindowLong to set the new procedure for the
> listview. I know for sure that the listview is subclassed via MFC in
> the App executable. What I get after calling SetWindowLong is a wrong
> behaviour of the listview (the original subclassing doesn't work
> anymore).
> Is it possible to subclassing an MFC subclassed window? Any
> suggestion?

> Thanks.



Sat, 15 Nov 2003 01:52:34 GMT  
 subclassing a MFC subclassed window
Thanks for help
Quote:

> Yes it can be  done. There is an excellent class appropriately named,
> CSubclassWnd in MSDN/MSJ. Search for that in MSDN and there are few examples
> along with it. All source can be downloaded from www.microsoft.com/msj.



Sat, 15 Nov 2003 15:04:56 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Subclassing CStatic on subclassed CDialogBar....

2. Subclassing Windows class in MFC

3. Subclassing MFC windows

4. Handlers in subclassed control and twice-subclassed control

5. MFC subclassed control FLICKER?

6. Porting MFC subclassed controls to win32 ?

7. Drop Source in a Subclassed Window

8. Drop Source in a Subclassed Window Proc

9. Getting SysListView32 subclassed window to respond to WM_LBUTTONUP

10. Trapping a button click in a window that's been subclassed

11. Doesn't subclassed window receive WM_CREATE?

12. Can't hook WM_CHAR in window subclassed in CDialog

 

 
Powered by phpBB® Forum Software