Click here to Skip to main content
15,898,718 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to monitor network traffic for a process Pin
feanorgem8-Mar-10 5:41
feanorgem8-Mar-10 5:41 
AnswerRe: How to monitor network traffic for a process Pin
Stephen Hewitt7-Mar-10 16:12
Stephen Hewitt7-Mar-10 16:12 
GeneralRe: How to monitor network traffic for a process Pin
feanorgem7-Mar-10 18:44
feanorgem7-Mar-10 18:44 
GeneralRe: How to monitor network traffic for a process Pin
Stephen Hewitt7-Mar-10 19:38
Stephen Hewitt7-Mar-10 19:38 
GeneralRe: How to monitor network traffic for a process Pin
feanorgem8-Mar-10 5:12
feanorgem8-Mar-10 5:12 
QuestionMouse down on disabled button Pin
marko20107-Mar-10 6:58
marko20107-Mar-10 6:58 
Answer[Wrong Answer]Re: Mouse down on disabled button [modified] Pin
Avi Berger7-Mar-10 12:42
Avi Berger7-Mar-10 12:42 
GeneralRe: Mouse down on disabled button Pin
LunaticFringe7-Mar-10 22:24
LunaticFringe7-Mar-10 22:24 
Avi Berger wrote:
Derive a class from CButton.

Override OnRButtonDown(). Have it enable the (button) window.



I think you're missing the point. If the window (button) is disabled, it won't receive the RButtonDown message.

No, I think the trouble here is the OP is trying to make the button do something the UI design doesn't support; e.g., trying to have a disabled window respond to mouse input.

Two possible solutions.

1) Redesign your UI and provide a checkbox used to enable/disable the button in question. The checkbox would always be enabled.

2) Derive a custom CButton descendant. Add a BOOL data member that would hold status info re: custom disabled/enabled state. Provide an owner-drawn capability that would draw the button in a disabled state if the custom status is disabled, and would draw the button normally otherwise. This way the button could still respond to mouse input even if it was 'disabled'.

Solution 2 is NOT recommended. It'd be a pain to implement, and the button behavior would violate UI standards.

UI standards exist for a reason. Users will be confused and frustrated by non-standard behavior that invalidates their expectations.
L u n a t i c F r i n g e

GeneralRe: Mouse down on disabled button Pin
Avi Berger8-Mar-10 4:57
Avi Berger8-Mar-10 4:57 
QuestionMessage Removed Pin
7-Mar-10 6:13
MrMcIntyre7-Mar-10 6:13 
AnswerRe: Internet Connection Pin
Emilio Garavaglia7-Mar-10 6:23
Emilio Garavaglia7-Mar-10 6:23 
GeneralRe: Internet Connection Pin
MrMcIntyre7-Mar-10 6:40
MrMcIntyre7-Mar-10 6:40 
AnswerRe: Internet Connection [modified] PinPopular
Avi Berger7-Mar-10 7:59
Avi Berger7-Mar-10 7:59 
GeneralRe: Internet Connection Pin
Richard MacCutchan7-Mar-10 9:52
mveRichard MacCutchan7-Mar-10 9:52 
GeneralRe: Internet Connection Pin
Luc Pattyn7-Mar-10 10:23
sitebuilderLuc Pattyn7-Mar-10 10:23 
JokeRe: Internet Connection Pin
Richard MacCutchan7-Mar-10 10:35
mveRichard MacCutchan7-Mar-10 10:35 
GeneralRe: Internet Connection Pin
Luc Pattyn7-Mar-10 11:13
sitebuilderLuc Pattyn7-Mar-10 11:13 
GeneralRe: Internet Connection Pin
Avi Berger7-Mar-10 12:01
Avi Berger7-Mar-10 12:01 
GeneralRe: Internet Connection Pin
Tim Craig7-Mar-10 13:23
Tim Craig7-Mar-10 13:23 
GeneralRe: Internet Connection Pin
CPallini8-Mar-10 0:59
mveCPallini8-Mar-10 0:59 
AnswerRe: Internet Connection Pin
Emilio Garavaglia7-Mar-10 9:55
Emilio Garavaglia7-Mar-10 9:55 
QuestionHow to organize MFC project directory structure - main and DLL programs? Pin
Vaclav_7-Mar-10 5:10
Vaclav_7-Mar-10 5:10 
AnswerRe: How to organize MFC project directory structure - main and DLL programs? Pin
Richard MacCutchan7-Mar-10 5:22
mveRichard MacCutchan7-Mar-10 5:22 
GeneralRe: How to organize MFC project directory structure - main and DLL programs? Pin
Vaclav_7-Mar-10 5:46
Vaclav_7-Mar-10 5:46 
AnswerRe: How to organize MFC project directory structure - main and DLL programs? Pin
Vaclav_7-Mar-10 7:15
Vaclav_7-Mar-10 7:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.