Solved

How do i select color of my own to draw an ellipse.

Posted on 2000-04-20
1
198 Views
Last Modified: 2013-11-20
HI,
 I have the following situaltion
CClient Cilent;
Client.Ellipse(X1,Y1,X2,Y2);

I want to fill this Ellipse with some color. I read the help which says select the brush and a pen . Let me know how do I do it.
Thanks in advance.
0
Comment
Question by:mkjoshi
1 Comment
 
LVL 1

Accepted Solution

by:
jianliuer earned 5 total points
ID: 2736936
You can do like this:

CClientDC Client(this);
CBrush brush(yourClr);
CBrush* pOldBrush = (CBursh*)(Client.SelectObject(&brush));
Client.Ellipse(X1,Y1,X2,Y2);
Client.SelectObject(pOldBrush);
brush.DeleteObject();


Good Luck!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Named range not carried over 10 62
Shell script to login to remote m/c and execute commands 10 78
tripleUp challenge 7 74
ShiftLeft challenge 21 76
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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 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

18 Experts available now in Live!

Get 1:1 Help Now