Solved

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

Posted on 2000-04-20
1
205 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 52
Process filename extension 3 208
Excel Use VBA to get user's Mac Address for their computer 5 333
format the code in java 6 109
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 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