Subclassing a Window 
Author Message
 Subclassing a Window

I am using doc/view for a program.  In my view class, I create a new
seperate window by hand using CreateWindow.  I try to subclass the window
using "SubclassWindow(newwin_hwnd)  window but I get an exception in wincore
during the attach call (in wincore) because the (m_hwnd) isn't NULL.  What
am I doing wrong??
TIA,
     Don


Mon, 16 Apr 2001 03:00:00 GMT  
 Subclassing a Window
Try adding this to your .CPP file.
#include "stdafx.h"

--
visit http://otool.hypermart.net

Quote:

>I am using doc/view for a program.  In my view class, I create a new
>seperate window by hand using CreateWindow.  I try to subclass the window
>using "SubclassWindow(newwin_hwnd)  window but I get an exception in
wincore
>during the attach call (in wincore) because the (m_hwnd) isn't NULL.  What
>am I doing wrong??
>TIA,
>     Don



Mon, 16 Apr 2001 03:00:00 GMT  
 Subclassing a Window
If you're creating the window by hand, why not just make it of the type you are trying to sub-class it as.

--

Quote:

>I am using doc/view for a program.  In my view class, I create a new
>seperate window by hand using CreateWindow.  I try to subclass the window
>using "SubclassWindow(newwin_hwnd)  window but I get an exception in wincore
>during the attach call (in wincore) because the (m_hwnd) isn't NULL.  What
>am I doing wrong??
>TIA,
>     Don



Mon, 16 Apr 2001 03:00:00 GMT  
 Subclassing a Window
Maybe I'm getting confused here...I was trying to subclass it so I can trap
it's windows messages...I'm not sure what you mean by making it of the same
type?
     Don

If you're creating the window by hand, why not just make it of the type you
are trying to sub-class it as.

--


Quote:
>I am using doc/view for a program.  In my view class, I create a new
>seperate window by hand using CreateWindow.  I try to subclass the window
>using "SubclassWindow(newwin_hwnd)  window but I get an exception in
wincore
>during the attach call (in wincore) because the (m_hwnd) isn't NULL.  What
>am I doing wrong??
>TIA,
>     Don



Tue, 17 Apr 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Subclassing foreign window and changing memory in it

2. Subclassing a window in different process

3. Problems subclassing a window

4. Subclassing a window

5. Subclassing a window in another application?

6. subclassing a window

7. Subclassing MFC windows

8. Subclassing System.Windows.Forms.ListBox

9. Subclassing window

10. Subclassing window

11. Subclassing Problem with Unicode Windows

12. Q: subclassing problem, with hook and windows messages

 

 
Powered by phpBB® Forum Software