?
Solved

graying a CIPAddressCtrl

Posted on 2006-10-18
2
Medium Priority
?
1,011 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month9 days, 6 hours left to enroll

764 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