Simple way to change dialog's background and text colors

If you want to change background or text color of your dialog box or form view window you can call CWinApp::SetDialogBkColor(COLORREF clrCtlBk, COLORREF clrCtlText) function. The first argument of the function is background color, second is text color. Call this member function from within the InitInstance member function to set the default background and text color for dialog boxes and message boxes within your application. For example, following code sets all application's dialogs to display a red background and a green text.
BOOL CMyApp::InitInstance()
{
	...
	// lets set red background and green text for our dialogs
	SetDialogBkColor(RGB(255, 0, 0), RGB(0, 255, 0));
	...
}

Last updated: 13 May 1998



Comments

  • Dragon beats,possibly man tribute tag with the new fad & mundane

    Posted by motherdhmm on 06/04/2013 10:17pm

    [url=http://blog.cheapbeatsbydre.co.nz/]beats by dre[/url] The music, we brute beats differentiate this corresponding exactly art respecting thousands of years seems to include unbreakable pact with humans; it brings more ingenuity on the shock Qiexi, carnival.Whether obsolete or inexperienced, we frightfulness beats dr.dre know there is in every charitable being¡¯s centre the catch of wonders, the unfailing credulous appetite of what are next and the prize of the match of living.Whether getting on in years or sophomoric, we awfulness beats dr.dre know there is in every human being¡¯s heart the coax of wonders, the unfailing ingenuous yearning of what are next and the ecstasy of the meeting of living. [url=http://blog.cheapbeatsbydre.co.nz/]beats by dre[/url] After going because of so numerous products, You forced to be tired, Here we determination not balk you and gratifying to my heinousness beats headphones blog. Word go, I yearn for to felicitate you that you have came to the right home, We sellMonster Beats Nearby Dr. Dre Solo HD headphones Here with special well-disposed of products. Beats dre australia are our latest products, There are a number of assorted styles. Dreadfulness beats alongside dre, Only of the most famous brands, Resolution emit you a feeling of nature, Cardinal you to a world of purity. [url=http://blog.cheapbeatsbydre.co.nz/]beats by dre nz[/url] Metal lamina with B logo ¨C Natural is more non glowing while pretend metal logo looks shiny! Sham has darker blacks and whiter whites! True spar has nicer TYPICAL lighting.we know that the frontage covers are practically identical except for the treatment of the lighting on the headphones.The lighting on the real swaddle have an obvious natural half vicious half grayish touch to it while the counterfeit has a more legitimate pitch black kind-hearted of lighting.

    Reply
  • readonly

    Posted by Legacy on 10/21/2003 12:00am

    Originally posted by: bruno leclerc

    In OnCtlColor function, I would like to know if the ctrl is readonly or not. How can I do ? GetWindowLong with ES_READONLY seems to not work.
    Thanks

    Reply
  • Chage Color Of Message WIndow in Vb

    Posted by Legacy on 07/01/2003 12:00am

    Originally posted by: kaleem

    How To Change a any color of message window in vb6

    Reply
  • Background color of CCeCommandBar

    Posted by Legacy on 05/16/2003 12:00am

    Originally posted by: Guth

    How can i modify the background color of a CCeCommandBar control (gray==>white) ?
    
    Thank's....

    Reply
  • What about Property Sheets and Property Pages?

    Posted by Legacy on 02/19/2003 12:00am

    Originally posted by: mkubo

    Your instruction works well for dialogs without property sheets and property pages. How can I change the colors of the property sheet and property page tabs? Thanks so much!

    Reply
  • how to change the dialog box color from dialog box itself(by clicking the button)

    Posted by Legacy on 02/11/2003 12:00am

    Originally posted by: jhansi

    how to change the dialog box color from dialog box itself(by clicking the button)
    

    Reply
  • www.habib.gq.nu

    Posted by Legacy on 08/25/2002 12:00am

    Originally posted by: Habib Ahmed

    gr8
    dialog bk color technique

    Reply
  • Urgent need of help! Pls, tell me how to change color of different dialogs from one place?

    Posted by Legacy on 03/17/2002 12:00am

    Originally posted by: Girija

    Hi,
    
    I have a dialog displaying various items and I want to provide the facility to add new items by asking for the new item name in a different dialog and also a provision for allowing the selecting an image for that item and add these as new item along with the selected object to the first dialog.
    I am in urgent need of help, Please, help me.

    In advance, thank u.

    Reply
  • Text Color w/o GUI

    Posted by Legacy on 02/08/2002 12:00am

    Originally posted by: Allan

    Can anyone tell my how to change the color in a C++ program without turning it into a GUI interface. Is this even possible? Any help would be greatly appreciated.

    Reply
  • colors for visual basic screens

    Posted by Legacy on 01/18/2002 12:00am

    Originally posted by: chandra sekhar.k.

    can any one help me out !!!. I want to change the color for SS.tab dialog control

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Today's agile organizations pose operations teams with a tremendous challenge: to deploy new releases to production immediately after development and testing is completed. To ensure that applications are deployed successfully, an automatic and transparent process is required. We refer to this process as Zero Touch Deployment™. This white paper reviews two approaches to Zero Touch Deployment--a script-based solution and a release automation platform. The article discusses how each can solve the key …

  • Learn How A Global Entertainment Company Saw a 448% ROI Every business today uses software to manage systems, deliver products, and empower employees to do their jobs. But software inevitably breaks, and when it does, businesses lose money -- in the form of dissatisfied customers, missed SLAs or lost productivity. PagerDuty, an operations performance platform, solves this problem by helping operations engineers and developers more effectively manage and resolve incidents across a company's global operations. …

Most Popular Programming Stories

More for Developers

RSS Feeds