Solved

graying a CIPAddressCtrl

Posted on 2006-10-18
2
965 Views
Last Modified: 2013-11-20
hello everyone,

when i add a CIPAddressCtrl to my form, and i click the disable check box, it doesn't go gray. i want to gray it while it is disabled...how do you gray it?
0
Comment
Question by:Joe_Banks_217
  • 2
2 Comments
 
LVL 22

Expert Comment

by:mahesh1402
ID: 17763744
when you disable CIPAddressCtrl it just disables it that means prevent access to input values but keeps background color white.....

otherwise if you want to change background color of IP address control as custom when disabled or greyed then yu need to subclass it and handle the WM_ERASEBKGND and WM_PAINT messages as well as the WM_CTLCOLOREDIT message from its children.

-MAHESH
0
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 300 total points
ID: 17763788
OK here you go about how to make ut gray :

Do not disable CIPAddressCtrl from your resource editor..just keep it enables... while within your code / InitDialog call : CIPAddressCtrl::EnableWindow(false);

e.g.

m_IPCtrl.EnableWindow(false); //m_IPCtrl is control variable of your CIPAddressCtrl.

This will disable as well gray out your IP address control.

-MAHESH
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now