subclassing dialog controls, Winsight problem

subclassing dialog controls, Winsight problem

Post by Gregor Bran » Sat, 14 Nov 1992 07:11:13



Help! :-)

  I have subclassed a dialog box control ( namely a button ) to intercept
keystrokes.  However, I NEVER get the escape key, is there a reasn for
this.  Also, even though I've interceptd the keys, and the original message
never gets to the control, I get a consistant beeping when the key
is held down.

  I am also having problems with winsight.   I have a program I wrote that
appears to run perfectly.  Except that everytime I run winsight with
the programs window active (or if I activate while winsight is
running)  I get a General Protection Fault at 0001:xxxx.  Any ideas would
be greatly appreciated.

Gregor Brandt
WK # 204-452-6776

 
 
 

subclassing dialog controls, Winsight problem

Post by Peter Nels » Sun, 15 Nov 1992 00:11:12



>Help! :-)

>  I am also having problems with winsight.   I have a program I wrote that
>appears to run perfectly.  Except that everytime I run winsight with
>the programs window active (or if I activate while winsight is
>running)  I get a General Protection Fault at 0001:xxxx.  Any ideas would
>be greatly appreciated.

   I had this problem, too.   I don't recall the exact details since
   I'm posting this from work and all my Windows stuff is at home,
   but the solution involved changing the prolog/epilog setting.
   When I sent my example program to Borland they tested it and
   acknowledged they had a bug but that was the last I ever heard
   from them (this was last summer).

---peter

 
 
 

1. How to subclass a dialog-based ActiveX control

I'm doing this in ATL (WTL) but question 2 below is very general. In any
case, I want to subclass a dialog-based ActiveX control in order to trap
messages in my own self-contained C++ class. The goal is to create a member
variable in the dialog class itself and then hook it up to the ActiveX
control in the WM_INITDIALOG handler (standard stuff). All messages should
be routed through this class's message map however, NOT the dialog's. So:

1) For ATL developers: Is it more appropriate to derive my class from
"CWindowImpl" or "CContainedWindow". I think the latter is primarily for
routing messages through the contained window's message map which doesn't
apply here (since I don't want to route through the dialog window's message
map). I will call "SubclassWindow()" in the WM_INITDIALOG handler
accordingly.
2) In general, how do you get hold of the actual window handle to subclass.
If you simply subclass the return value of "GetDlgItem()", that returns the
ActiveX control's container window if I'm not mistaken. You need to subclass
the ActiveX control window itself however which is a child of the latter
window I believe. I'm a little fuzzy on the window relationships here
however. What is the formal way of getting hold of this window then?

Thanks.

2. where I can get roms and cpm-rom for cpc

3. Handling notification messages from contained subclassed activex control inside dialog class

4. Use a function?

5. Control Subclassing and Dialog Proc

6. US-MD-C++/OO/UNIX/Trading Systems Consultants NEEDED

7. Subclassing Controls in a Dialog (HELP!)

8. Second posting of MINIX software list

9. "Subclassing" dialog controls

10. Subclassing a dialog control

11. Subclassing dialog controls

12. problems with a CWnd subclass in a dialog box

13. Problems Subclassing FileOpen Dialog.