Solved

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

Posted on 2000-04-20
1
204 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.

861 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