Solved

graying a CIPAddressCtrl

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

724 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