Solved

graying a CIPAddressCtrl

Posted on 2006-10-18
2
975 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pressing cancel button with C# UI Automation 3 51
fizzArray2 challenge 1 72
withoutTen challenge 14 100
sumHeights2  challenge 7 88
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

867 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

16 Experts available now in Live!

Get 1:1 Help Now