Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

graying a CIPAddressCtrl

Posted on 2006-10-18
2
Medium Priority
?
1,020 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

618 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