Click here to Skip to main content
15,889,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionpointer and address? Pin
dec8220-May-09 15:45
dec8220-May-09 15:45 
AnswerRe: pointer and address? Pin
Chris Losinger20-May-09 16:33
professionalChris Losinger20-May-09 16:33 
AnswerRe: pointer and address? Pin
ThatsAlok20-May-09 21:39
ThatsAlok20-May-09 21:39 
AnswerRe: pointer and address? Pin
CPallini21-May-09 0:12
mveCPallini21-May-09 0:12 
QuestionUsing Multithreading to encrypt a file Pin
Sh_oK20-May-09 14:16
Sh_oK20-May-09 14:16 
AnswerRe: Using Multithreading to encrypt a file Pin
Chris Losinger20-May-09 15:19
professionalChris Losinger20-May-09 15:19 
GeneralRe: Using Multithreading to encrypt a file Pin
Sh_oK25-May-09 13:02
Sh_oK25-May-09 13:02 
QuestionGetting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Sternocera20-May-09 9:58
Sternocera20-May-09 9:58 
Hello,

I'm developing an MFC application, an enterprise database accessing program where the user is potentially denied access to some of the views that appear in the right hand splitter pane (all of which are classes derived from my own custom base class that is derived from CFormView). I call EnableWindow(FALSE) from within the right hand views where appropriate (from my custom base class) to disable the view entirely, including making it impossible to tab to the view. So far, so good.

However, the problem of there being no obvious visual indication of *why* the view is locked, and that it is supposed to be locked, persists. Examples of appropriate strong visual cues include:

1. Darkening the View
2. Making the view grayscale
3. Making the mouse cursor appear as a padlock or somesuch when it overlays the view.
4. When the user clicks on the view, display a messagebox that explains that access is denied.

How can I achieve any of these visual cues? The problem is, because I've disabled the view, through the call to EnableWindow(FALSE), I cannot do a whole lot. I cannot change the mouse cursor in the usual way. I can provide implementations of any Cview/CWnd virtual functions, such as OnDraw(), but I cannot seem to Draw to my CViews in any useful way, as can be done with a CScrollView.


How can I create any of these strong visual cues?

Regards,
Sternocera
GeneralRe: Getting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Michael Dunn20-May-09 10:43
sitebuilderMichael Dunn20-May-09 10:43 
GeneralRe: Getting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Sternocera20-May-09 11:32
Sternocera20-May-09 11:32 
GeneralRe: Getting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Sternocera20-May-09 11:56
Sternocera20-May-09 11:56 
AnswerRe: Getting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Stuart Dootson20-May-09 11:39
professionalStuart Dootson20-May-09 11:39 
GeneralRe: Getting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Sternocera20-May-09 12:10
Sternocera20-May-09 12:10 
GeneralRe: Getting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Stuart Dootson20-May-09 13:22
professionalStuart Dootson20-May-09 13:22 
GeneralRe: Getting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Sternocera20-May-09 22:58
Sternocera20-May-09 22:58 
GeneralRe: Getting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Stuart Dootson21-May-09 0:56
professionalStuart Dootson21-May-09 0:56 
GeneralRe: Getting a disabled CView to give a strong visual cue of being disabled, so that the user understands that it isn't a bug that it's disabled. Pin
Sternocera21-May-09 3:35
Sternocera21-May-09 3:35 
QuestionHow to manipulate with processes from your app? Any help is appreciated Pin
Oshtri Deka20-May-09 7:55
professionalOshtri Deka20-May-09 7:55 
AnswerRe: How to manipulate with processes from your app? Any help is appreciated Pin
Stuart Dootson20-May-09 8:16
professionalStuart Dootson20-May-09 8:16 
GeneralRe: How to manipulate with processes from your app? Any help is appreciated Pin
Oshtri Deka20-May-09 22:38
professionalOshtri Deka20-May-09 22:38 
AnswerRe: How to manipulate with processes from your app? Any help is appreciated Pin
ThatsAlok20-May-09 21:42
ThatsAlok20-May-09 21:42 
GeneralRe: How to manipulate with processes from your app? Any help is appreciated Pin
Oshtri Deka20-May-09 22:41
professionalOshtri Deka20-May-09 22:41 
QuestionCEdit with image suport? Pin
bosfan20-May-09 7:24
bosfan20-May-09 7:24 
AnswerRe: CEdit with image suport? Pin
David Crow20-May-09 7:43
David Crow20-May-09 7:43 
AnswerRe: CEdit with image suport? Pin
Nuri Ismail20-May-09 7:50
Nuri Ismail20-May-09 7:50 

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.