Solved

Getting default a Cdialog BackGround Color

Posted on 1998-02-15
2
864 Views
Last Modified: 2013-11-20
Hi ...
 
My question is quite easy

from a CDialog, i draw a rect using dc.Rectangle(&rect) , it draws it to me in white in my dialog box , it's okay
But i dunno how to delete it,
so , how could i get the backgorund color of my Cdialog
to rewrite a REct of same size at same location x,y, but not in white , but with the background color of my Cdialog ?

Or maybe is there any other way to delete my Drawed Rectangle ?
Thanx for all
0
Comment
Question by:SkizoWalker
2 Comments
 
LVL 11

Accepted Solution

by:
mikeblas earned 50 total points
Comment Utility
You can get the default color for the background of a dialog by calling GetSysColor() with the COLOR_WINDOW parameter.  That'll return you the COLORREF that you can use to create a brush. Create and select that brush before your call to Rectangle(), and your rectangle will have the correct color.

If you want a rectangle with nothing colored inside of it, you should draw a rectangle yourself by calling CDC::MoveTo() and CDC::LineTo(), or by calling CDC::Polyline or CDC::Polygon().

I don't understand your comment about "a way to delete my drawed rectangle".  If you don't want a rectangle, why did you draw it?

.B ekiM

0
 

Author Comment

by:SkizoWalker
Comment Utility
Okay thanx for this little teach ;)

>I don't understand your comment about "a way to delete my drawed rectangle". If you don't want a rectangle, why did you draw it?

I need my rectangle that's why i draw it, i was thinking another way of deleting it my drawed rectangle without filling it with background color, you see ? anyway , thanx for fast help

Greetings . . SkiZo / MoDEL

http://model.tekno.org      3DReal Time Visual FX Engeniring

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now