Subclassed RadioButton hanging when clicked?! 
Author Message
 Subclassed RadioButton hanging when clicked?!
Has anyone seen the situation where a subclassed radio button appears to
hang when the user clicks on it?

It only seems to happen when the radio buttons are placed immediately after
a CEdit control. Breaking in the de{*filter*} shows execution point bouncing
around in User32, with the last recognizable call in the call stack being
DefWndProc, with either the WM_LBUTTONDOWN or the WM_GETDLGCODE messages
being handled. Nothing about the wParam and lParam for these messages looks
incorrect. It never returns though from User32.

Any suggestions?
TIA.



Mon, 29 Sep 2003 02:43:54 GMT  
 Subclassed RadioButton hanging when clicked?!

Quote:
>Has anyone seen the situation where a subclassed radio button appears to
>hang when the user clicks on it?

>It only seems to happen when the radio buttons are placed immediately after
>a CEdit control. Breaking in the de{*filter*} shows execution point bouncing
>around in User32, with the last recognizable call in the call stack being
>DefWndProc, with either the WM_LBUTTONDOWN or the WM_GETDLGCODE messages
>being handled.

If this is only happening when you sub-class the control, in your
code, are you perhaps not passing some messages to the default
handler?

Dave
--
MVP VC++ FAQ: http://www.*-*-*.com/
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Mon, 29 Sep 2003 04:00:16 GMT  
 Subclassed RadioButton hanging when clicked?!
Thanks for the reply!

Well, could not passing certain messages cause a{*filter*} problem? I am
currently calling CButton::On<same function-name-message-handler>, followed
by return, in all my WM_type message handlers except for WM_PAINT, and
WM_CTLCOLOR.

However, I am NOT calling the default handler for any of the BM_xxx or
BN_CLICKED message handers. This is correct, no?


Quote:
> >Has anyone seen the situation where a subclassed radio button appears to
> >hang when the user clicks on it?

> >It only seems to happen when the radio buttons are placed immediately
after
> >a CEdit control. Breaking in the de{*filter*} shows execution point bouncing
> >around in User32, with the last recognizable call in the call stack being
> >DefWndProc, with either the WM_LBUTTONDOWN or the WM_GETDLGCODE messages
> >being handled.

> If this is only happening when you sub-class the control, in your
> code, are you perhaps not passing some messages to the default
> handler?

> Dave
> --
> MVP VC++ FAQ: http://www.*-*-*.com/
> My address is altered to discourage junk mail.
> Please post responses to the newsgroup thread,
> there's no need for follow-up email copies.



Mon, 29 Sep 2003 05:08:45 GMT  
 Subclassed RadioButton hanging when clicked?!

Quote:
>Well, could not passing certain messages cause a{*filter*} problem?

Probably - I wouldn't have suggested it otherwise.

Quote:
> I am
>currently calling CButton::On<same function-name-message-handler>, followed
>by return, in all my WM_type message handlers except for WM_PAINT, and
>WM_CTLCOLOR.

>However, I am NOT calling the default handler for any of the BM_xxx or
>BN_CLICKED message handers. This is correct, no?

I couldn't tell you off the top if my head.

Try removing the calls to your handlers and then add them back in one
at a time until you isolate what's causing the problem.

Dave
--
MVP VC++ FAQ: http://www.*-*-*.com/
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Mon, 29 Sep 2003 05:48:15 GMT  
 Subclassed RadioButton hanging when clicked?!
I did try removing all the message handlers for the object, and still have
this{*filter*} problem. I understand it's a strange problem, but that's why I
posted a question here.


Quote:
> >Well, could not passing certain messages cause a{*filter*} problem?

> Probably - I wouldn't have suggested it otherwise.

> > I am
> >currently calling CButton::On<same function-name-message-handler>,
followed
> >by return, in all my WM_type message handlers except for WM_PAINT, and
> >WM_CTLCOLOR.

> >However, I am NOT calling the default handler for any of the BM_xxx or
> >BN_CLICKED message handers. This is correct, no?

> I couldn't tell you off the top if my head.

> Try removing the calls to your handlers and then add them back in one
> at a time until you isolate what's causing the problem.

> Dave
> --
> MVP VC++ FAQ: http://www.*-*-*.com/
> My address is altered to discourage junk mail.
> Please post responses to the newsgroup thread,
> there's no need for follow-up email copies.



Mon, 06 Oct 2003 23:22:17 GMT  
 Subclassed RadioButton hanging when clicked?!

Quote:
>I did try removing all the message handlers for the object, and still have
>this{*filter*} problem.

So what else remains in your sub-class - can you remove those aspects
as well?

Just in case I'm sending you on a wild goose chase, are you 100% sure
that it doesn't happen with a non-subclassed radio button?

Dave
--
MVP VC++ FAQ: http://www.*-*-*.com/
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Tue, 07 Oct 2003 00:46:45 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Subclassed RadioButton hanging when clicked!

2. Strange RadioButton Hanging Problem!

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

4. Handlers in subclassed control and twice-subclassed control

5. RadioButton group binding?

6. Help With Casting A Control Item To RadioButton

7. RadioButton: REALLY URGENT!!

8. RadioButton

9. RADIOBUTTON BOX SIZE

10. Default RadioButton Question

11. Grouping RadioButton

12. TreeView: RadioButton style how?

 

 
Powered by phpBB® Forum Software