Click here to Skip to main content
15,922,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Linker error - MFC DLL - missing constructor??? Pin
Eugen Podsypalnikov8-Mar-10 19:47
Eugen Podsypalnikov8-Mar-10 19:47 
AnswerRe: Linker error - MFC DLL - missing constructor??? [modified] Pin
Stephen Hewitt7-Mar-10 20:32
Stephen Hewitt7-Mar-10 20:32 
AnswerRe: Linker error - MFC DLL - missing constructor??? Pin
KarstenK8-Mar-10 0:04
mveKarstenK8-Mar-10 0:04 
AnswerRe: Linker error - MFC DLL - missing constructor??? - Update Pin
Vaclav_8-Mar-10 4:59
Vaclav_8-Mar-10 4:59 
AnswerRe: Linker error - MFC DLL - missing constructor??? SOLVED with AFX_EXT_CLASS Pin
Vaclav_8-Mar-10 6:12
Vaclav_8-Mar-10 6:12 
QuestionCDAtataBase Example Pin
jannathali7-Mar-10 19:42
jannathali7-Mar-10 19:42 
AnswerRe: CDAtataBase Example Pin
KingsGambit7-Mar-10 19:53
KingsGambit7-Mar-10 19:53 
AnswerRe: CDAtataBase Example Pin
BIJU Manjeri7-Mar-10 21:18
BIJU Manjeri7-Mar-10 21:18 
QuestionHow to use Timer in win32 dll? Pin
Rahul Vaishnav7-Mar-10 19:35
Rahul Vaishnav7-Mar-10 19:35 
AnswerRe: How to use Timer in win32 dll? [modified] Pin
KingsGambit7-Mar-10 19:51
KingsGambit7-Mar-10 19:51 
AnswerRe: How to use Timer in win32 dll? Pin
Alain Rist7-Mar-10 22:00
Alain Rist7-Mar-10 22:00 
QuestionHow to monitor network traffic for a process Pin
feanorgem7-Mar-10 13:08
feanorgem7-Mar-10 13:08 
AnswerRe: How to monitor network traffic for a process Pin
Garth J Lancaster7-Mar-10 15:00
professionalGarth J Lancaster7-Mar-10 15:00 
AnswerRe: How to monitor network traffic for a process Pin
Garth J Lancaster7-Mar-10 15:06
professionalGarth J Lancaster7-Mar-10 15:06 
GeneralRe: How to monitor network traffic for a process Pin
feanorgem7-Mar-10 18:48
feanorgem7-Mar-10 18:48 
GeneralRe: How to monitor network traffic for a process Pin
Garth J Lancaster7-Mar-10 19:08
professionalGarth J Lancaster7-Mar-10 19:08 
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 

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.