Draw disabled checkbox (manually)

Hello

Here's the problem. I have my own object (derived from CObject) which must
draw a disabled checkbox from time to time.
I know how to draw an "active" checkbox (using CDC::DrawFrameControl), but I
can't figure out how to "disable" it.

I've tried with DrawState, but the result does not look like the disabled
checkbox.
Any hints are welcomed.

Best Regards
Janusz


0
erfan (23)
2/26/2004 1:22:11 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
975 Views

Similar Articles

[PageSpeed] 33


> Here's the problem. I have my own object (derived from CObject) which must
> draw a disabled checkbox from time to time.
> I know how to draw an "active" checkbox (using CDC::DrawFrameControl), but
I
> can't figure out how to "disable" it.
>
> I've tried with DrawState, but the result does not look like the disabled
> checkbox.
> Any hints are welcomed.

Nevermind, I've found an answer: DFCS_BUTTON3STATE

Best
Janusz


0
erfan (23)
2/26/2004 1:44:40 PM
"Janusz" <erfan@poczta.onet.pl> wrote in message
news:eIgz9sG$DHA.2412@TK2MSFTNGP12.phx.gbl...
> Hello
>
> Here's the problem. I have my own object (derived from CObject) which must
> draw a disabled checkbox from time to time.
> I know how to draw an "active" checkbox (using CDC::DrawFrameControl), but
I
> can't figure out how to "disable" it.

What does DFCS_INACTIVE do?
-- 
Jeff Partch [VC++ MVP]


0
jeffp (1712)
2/26/2004 1:49:04 PM
> What does DFCS_INACTIVE do?
> --
> Jeff Partch [VC++ MVP]
>

It looks like DFCS_INACTIVE does the same thing as DFCS_BUTTON3STATE (the
only difference is that DrawFrameControl uses different background color
when used with DFCS_INACTIVE).
I gues both can be used to represent the disabled checkbox.

Thanks
Janusz



0
erfan (23)
2/27/2004 7:28:21 AM
Reply:

Similar Artilces:

a new drawing not erase previous drawing?
visual studio c++ 6.0, mfc, graphics in my program a new drawing erases previous drawing. How to manage that all that is drawn stays alive on the window? And is not erased when the window is covered by another window, as well. And that the image does not flicker... Those last two have from time to time appeared in my attempts to solve the first problem. And that I didn't manage at all - make the first drawing, then the second, see them both at the same time on the window. I have tried the following and maybe more: Invalidate(false), InvalidateRect(false), override OnEraseBkgnd, ...

Best method for looping through checkboxes
Hi community, hope we're all well and happy! I have a document with 60 formfield checkboxes that I require to loop through to ascertain their value. I plan to create an array and then use a loop like this and wondered if this is most efficient/fastest way of doing this, any advice/guidance would be greatyl apprieciated. Dim oDoc As Document Dim blnCheck(0 To 29) As Boolean Set oDoc = Application.ActiveDocument y = 0 For i = 34 To 153 Step 4 blnCheck(y) = CBool(oDoc.FormFields("Check" & i).CheckBox.Value) y = y + 1 Next i Set oDoc = Nothing ...

how to draw a bitmap transparently?
Hi, I have an owner draw button associated with a bitmap. In the bitmap editor, I turn off the option "draw opaque" for the bitmap. That is, I make it transparent. However, the the bitmap's background color still shows up on the button. The bitmap has only a solid circle in the middle. What else do I have to do? Please help. Thanks. Tony One thing you can do--and this works only for some restricted cases, which you may or may not have--is to make the button background 192,192,192, and when you LoadImage, you specify LR_MAP3DCOLORS. It will change the 192,192,192 to...

owner draw CListBox, how to draw "no item found"
Hello, I have an owner draw listbox, in the DrawItem I draw the items. If the listbox doesn't contain any item I would like to display a message "no item found" but this is no item, so DrawItem is the wrong place. Where should I do this? OnPaint, OnEraseBkgnd? I thought I would be able to do something like this for a test (just paint the window blue) but it's always white BOOL CmyListbox::OnEraseBkgnd(CDC* pDC) { if (m_pItemList.GetCount() < 1) { CRect rc; GetClientRect(&rc); pDC->FillSolidRect(rc,RGB(0,0,255)); return TRU...

Disabled users
I am using Exchange 2003 on Windows Server 2003. I have a user who quit, and I disabled her account in AD. However, when I send mail to her email address, it does not come back with an NDR. If this does not work the way I expect, is there any way I can make her mail get kicked back short of deleting her account? Never mind. It just started working. Sorry for wasting the group's time. "Drew Burchett" <drewb@united-systems.com> wrote in message news:OLw7wzxOHHA.1252@TK2MSFTNGP02.phx.gbl... >I am using Exchange 2003 on Windows Server 2003. I have a user who ...

Anyone want to draw roads?
Just thought that if anyone wants to do diagrams with roads or rivers as double lines then Jeff Lanam (this n/group) kindly provided me with this link to a free programme called OCAD. Its a tiny file, is EASY to use and the results can be exported as a .bmp into Publisher. www.ocad.com I asked on this newsgroup how to achieve this and many threads resulted, so thought I'd post the solution. Many thanks Jeff (see reply to your post) Chrissss........ Glad you solved your map problem. An interesting program. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.o...

Disable a Textbox default context menu
How do I disable the default contextmenu on a Textbox? I want a user to be able to right click a textbox and have an action happen but even if I set the contextmenustrip property for the textbox to (none) I still get the default copy/paste menu, how do I completely disable it. Thanks Robert Am 30.05.2010 21:44, schrieb Roidy: > How do I disable the default contextmenu on a Textbox? \\\ Me.TextBox1.ContextMenu = New ContextMenu() /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> ...

Hotfix for IMC to disable NDR sending in Exchange 5.5
NDR off Exchange 5.5, this topic Creig said there is a hotfix for IMC to privent sending NDR. All the Internet round...where is it? Can anyboby help me to get it? Thanks in advance, TsepkovTs admin@borets.ru There=B4s no way to disable NDR in 5.5 You have to create an empty distribution list with all the=20 addresses that the spammer is trying to send to. I mean in the Email Address tab of the DL add ALL the=20 bogus emails. >-----Original Message----- >NDR off Exchange 5.5, this topic Creig said there is a=20 hotfix for IMC to >privent sending NDR. All the Internet round...where ...

temporary disabling
Is it possible in Exchange 5.5 to disable the users mailbox during non-working hours. Looking for a way to turn the tide on spam. No - and that isn't the best method. Look into a third party spam filtering application or a service like www.postini.com jallen wrote: > Is it possible in Exchange 5.5 to disable the users mailbox during > non-working hours. Looking for a way to turn the tide on spam. ...

Form Event to disable a checkbox
I want to disable FINAL (check box field) if certain products are selected in my PRODUCT text box. Ex: Me.Product in(‘one ‘,’two’,’three’ ) then Me.final.enabled =false Else Me.Final.enabled = true So my question is: what form event is best to include this condition? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201002/1 Put your code in the Product_AfterUpdate event. "mls via AccessMonster.com" wrote: > I want to disable FINAL (check box field) if certain products are selected in > my PR...

Disable resize Waterfall chart
Hi folks, I have a Waterfall Chart in my spreadsheet. I need to disable the resize function of the chart. Does anyone can show me the code (way) to disable resize the chart? Thanks in advance. Tim. Which "resize" function would this be? - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Tim wrote: > Hi folks, > > I have a Waterfall Chart in my spreadsheet. I need to disable the resize > function of the chart. Does anyone can show me the code (way) to disable > resize t...

Draw a horizontal line after the last record is printed on each pa
The details section of my report draws vertical lines which grow to accomodate text size changes. I would like to have a horizontal line drawn when last record finishes printing on the page and joins the end of the last vertical line to make a table. Please help. Thanks. -- Lydia Liu Access/VB Programmer There was at least one answer posted to your same question yesterday. -- Duane Hookom Microsoft Access MVP "Lydia" wrote: > The details section of my report draws vertical lines which grow to > accomodate text size changes. I would like to ha...

Disabling Page Setup?
Hi, I'm fairly new to Excel and was wondering how one might be able t Disable the Page Setup menu in Excel? Any suggestions would b appreciated. Thank you -- Plazzm ----------------------------------------------------------------------- Plazzma's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2523 View this thread: http://www.excelforum.com/showthread.php?threadid=38722 Hi Sub test() Application.CommandBars("Worksheet Menu Bar").FindControl _ (ID:=247, Recursive:=True).Enabled = False End Sub You must also disable printpreview See for more info ...

Where did the drawing go?
Visio 2003 SP2 with all the latest patches. I have an extensive floor plan created in a file. I renamed the page by double-clicking on the tab and replacing the name with 'Current'. I then added a page and called it 'Proposed'. The program hour-glassed for a bit which I thought was curious and then hung. I could close the program and since I did some editing on the file, I saved it when prompted. The next time I opened the file, the design was not visible and the scale was literally off the charts (it says X = - 46 ft., Y = 89478492 ft. 6, and if I go into Page Setup a...

disabling auto email forwarding
A good while ago I set up email forwarding to account b from account a which I set up in outlook. I thought I set it up with rules but now when I go to rules to disable there is not the information there to disable as I was instructed by MS help. Does anyone know what may be going on or a way to disable auto forwarding? If you use Outlook you posted to the wrong place; Depending on version of Outlook, Tools>Organiize>Rules & Alerts "diggster" <u58381@uwe> wrote in message news:a41034a58da23@uwe... >A good while ago I set up email forwarding to accoun...

No RMS Manuals are shipping with Ver 1.3
Microsoft is no longer including a user manual with Store Ops Ver 1.3, only the quick start guide. I cannot find a user manual PDF on the CD. Can anyone provide me with a link to download a user guide for a new customer install? Thanks, Kinnard L. Kohler Business Machines Systems 6101 South Shackleford Road Little Rock, AR 72204-8606 (T) 501-375-8380 (F) 501-375-0043 (Cell) 501-412-5686 www.bmsar.com Email: kinnard@bmsar.com You can d/l the manuals from CustomerSource. The links for v1.2 User Guides take you to v1.3 downloads. I'd imagine that MS would want to update their lin...

Windows Mail disable
I somhow enabled Windows Mail but want to turn it off & use my other email program. I can't find out where to turn this off - can someone help me? Launch Local Group Policy Editor. Go to Computer Configuration from the left pane, then Administrative Templates, Windows Components, and then Windows Mail. Right click on Turn off Windows Mail application and select Properties. Click on Enabled and then OK. Finally close the Local Group Policy Editor window. -- Ashburn ------------------------------------------------------------------------ Ashburn's Profile: http://...

Drawing graphs on Modal dialogs
I've encounter a strange phenomenon: I have an MFC application that creates a child dialog using DoModal(). Within this child dialog I have a couple of buttons and a graph plot drawn within the area of a Cstatic using a third party API from GraphicsServer. This modal dialog has a minimize button, but when I minimize the dialog, the graph doesn't minimize with the dialog is always on top of the screen. Has anyone encountered this problem? Do you think is is a GraphicsServer issue or a Microsoft issue? I've called Graphics Server and they say that they haven't countered my proble...

How to draw text always visible
Hi NG, I Have program which is drawing objects(PIPES)using the OPENGL. The labels for the for the PIPE is drawing using the GDI. The text colour for the labels is same that of the objects. The labels are usually positioned at out side of the pipe so that it will be visible always. But while rotating there are possibilities that the labels and objects coincide. I want to set the labels always visible with respect to the back ground colour. I used SetRop2() but it has no effect. Any help would be greatly appreciated Best regards Raghuram.k ...

Owner draw main windows, will left some drawing on the background of the window, I want the reason and how to prevent this happen? 01-05-10
Hi, Everyone! Ownerdraw main window , I used SetWindowRgn to cut down the four corners, but there will left something drawing here when you drag the corners and borders to resized the window on the background of the main window. Only 3 corners of the four corners do this. I used HDC hWindowDC = GetWindowDC(); Draw the non client area on hWindowDC In class of WTL: class CMainFrame : public CFrameWindowImpl<CMainFrame>, public CUpdateUI<CMainFrame>, public CMessageFilter, public CIdleHandler Thanks a lot! Have a Happy New Year! begin 666 problem.JPG ...

How Draw a chart showing the following function: y=sin(x)
Can someone explain me how can i make this chart i excel? Remember i don't want use function to count! I want draw! Thanks for hel -- Pusie ----------------------------------------------------------------------- PusieK's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1621 View this thread: http://www.excelforum.com/showthread.php?threadid=27630 For a variety of approaches adapt the ideas at Normal curve http://www.tushar-mehta.com/excel/charts/normal_distribution/index.htm particularly the three sections: Enumerating a set of points in a worksheet Using...

Disabling the virus warning pop-up
I am trying set up a Sony Ericsson T68 mobile phone to sync with Outlook 2003 using Sony Ericsson Communication Suite 1.5.9. I think the problem is the Outlook virus warning pop-up window. When I try to sync it finds the phone then the OL virus warning flashes by so quickly that I don't have time to answer it. The Sony Ericsson software then just kind of locks up and doesn't do anything. When I say Outlook virus warning pop-up window I am talking about the window that pops up and says: A program is tyring to access e-mail addresses you have stored in Outlook. Do you want to allow ...

Disable / equivalence to Alt?
If you select a cell and then press the forward slash key ("/"), Excel shifts focus to the menu (even if the cell was pre-formatted as text), as though you had pressed Alt. Apparently the only ways to begin a text string with "/" is either to begin with a single quote or to type the text into the formula window. Is there a way to disable this behavior so that you can simply press the forward slash key? Jerry Choose Tools>Options, and on the Transitions tab, clear the slash from the 'Microsoft Excel menu or help key' box Jerry W. Lewis wrote: > If y...

CheckBox Processing
Hi Folks - Access 2000 .... I currently have a combo box form field that displays 4 categories: Science, Math, English, History. The original specs indicated that a teacher would be assigned to only ONE category. However, the specs have changed. Now, it turns out that a teacher can belong to more than one category. This category choice is the criteria for numerous queries. I'm trying to figure out the best way to make the change. My first thought is to make a related table, then add a subform that will allow multiple categories to be assigned to the teacher. I would then need to ch...

Controlling drawings (a CM problem)
Can you save me the trouble? I'm looking for a cheap and easy tool to support the control of drawings (which in fact are currently Word documents) that describe hardware components and how they build up through sub-assemblies into assemblies and systems. It needs some version control at the drawing level, and a baselining function. I know we could do it with something like Dimensions, or maybe even ClearCase, but they're too big and expensive. If necessary. I'll write something myself in Access, but before I do, is there anything out there (freeware, shareware?) that migh...