Solved

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

Posted on 2000-04-20
1
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pressing cancel button with C# UI Automation 3 104
How to determine file rename from EventLog ? 2 62
isEverywhere  challenge 19 91
matchUp  challenge 6 82
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

751 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