Re: Value Based Colorization of Dialog Controls

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



mcdesigns@xxxxxxxxx wrote:
I'm currently working with an MFC dialog box that displays numerical
data dynamically from a remote server in a series of text control
boxes. I'd like to be able to change the background color of these
boxes based upon the values in the boxes.

So far, I've been able to change the default color of the background of
the entire dialog box and modify all text colors. However, modifying
colors for specific boxes and making changes based on values called
from those boxes is a bit challenging for me. If anyone could give me
any tips or ideas on how I might approach this, I would be very
grateful.


Kind regards, Marcus


You should handle a WM_CTLCOLOR message in dialog box. Editboxes sends this message to its parent window for painting parameters.


Asko.
.



Relevant Pages

  • Re: Semi-modal form?
    ... Like I indicated on my response to him, the frmWait loads fully now, but it ... acts as though the Timer event isn't firing. ... and it just repetitvely changes the background color ... the boxes stay white. ...
    (microsoft.public.access.formscoding)
  • Code Help
    ... >background color to red and if unselected it changes back ... >have 31 boxes each with a checkbox. ... the code following the first comma otherwise it will run ...
    (microsoft.public.access.forms)
  • Looping through form controls
    ... I want to loop through text boxes on a continuous form and change the ... background color if the date in the text box equals today's date. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Combo Box in 2007 changes other combo box background
    ... Change the Alternate Background color to. ... If I select the drop down on one of the combo boxes and it ... overlaps any of the other combo boxes some of them will change to a ... If I view the drop down of a transparent box it ...
    (microsoft.public.access.formscoding)
  • Re: I like the new ruby-doc.org!
    ... Not so much nitpicking as whining, but it'd be nice if the boxes around ... the various categories remained after zapping the background colour. ... If I edit the CSS and remove the background color, ...
    (comp.lang.ruby)