Click here to Skip to main content
15,890,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Moving Ellipse Problem Pin
Zac Howland1-Aug-06 4:28
Zac Howland1-Aug-06 4:28 
QuestionAccess Web Services from MS eMbedded C++ 4.0 Pin
iks1-Aug-06 1:09
iks1-Aug-06 1:09 
QuestionXMLRPC and VStudio6.0(VC++) Pin
_AnsHUMAN_ 1-Aug-06 0:49
_AnsHUMAN_ 1-Aug-06 0:49 
QuestionTooltip to static text?? Pin
Manjunath S1-Aug-06 0:48
Manjunath S1-Aug-06 0:48 
AnswerRe: Tooltip to static text?? Pin
uday kiran janaswamy1-Aug-06 1:02
uday kiran janaswamy1-Aug-06 1:02 
QuestionMoving Ellipse Problem Pin
uday kiran janaswamy1-Aug-06 0:34
uday kiran janaswamy1-Aug-06 0:34 
AnswerRe: Moving Ellipse Problem Pin
Hamid_RT1-Aug-06 0:50
Hamid_RT1-Aug-06 0:50 
GeneralRe: Moving Ellipse Problem [modified] Pin
uday kiran janaswamy1-Aug-06 0:53
uday kiran janaswamy1-Aug-06 0:53 
hi whitesky,

i have created an ellipse using cdc::ellipse(...).

but once it is created, and the mouse is entered into the ellipse what i have created, if i press the Left button and dragged the ellipse what i have drawn, it should move accordingly with the current position of the mouse.
please help me out. It is really a challenging task.
//===========================================================
if((insidepoint == true ) && (nFlags & MK_LBUTTON))
{
CRect rect;
GetClientRect(&rect);
ClientToScreen(&rect);
SetCapture();

// nOldMode = dc.GetROP2();
dc.SetROP2(R2_NOT);
one.CreatePen(PS_DASHDOT,1,RGB(200,200,0));
old = dc.SelectObject(&one);
dc.SelectStockObject(NULL_BRUSH);

double dia = sqrt((array[2]-array[0])*(array[2]-array[0]) + (array[3]-array[1])*(array[3]-array[1]))/2;
dc.Ellipse(OldPoint.x,OldPoint.y,(point.x + dia),(point.y + dia));
dc.Ellipse(point.x,point.y,(point.x + dia),(point.y + dia));
OldPoint = point;
// dc.SetROP2(nOldMode);
dc.SelectObject(old);
showCordinates(point);
}


//===========================================================

please help me out.



uday.


-- modified at 6:54 Tuesday 1st August, 2006
GeneralRe: Moving Ellipse Problem Pin
Hamid_RT1-Aug-06 1:27
Hamid_RT1-Aug-06 1:27 
GeneralRe: Moving Ellipse Problem Pin
uday kiran janaswamy1-Aug-06 1:30
uday kiran janaswamy1-Aug-06 1:30 
QuestionRTTI Pin
vikramlinux31-Jul-06 23:59
vikramlinux31-Jul-06 23:59 
AnswerRe: RTTI Pin
toxcct1-Aug-06 0:36
toxcct1-Aug-06 0:36 
GeneralRe: RTTI Pin
ThatsAlok1-Aug-06 23:52
ThatsAlok1-Aug-06 23:52 
QuestionSQL Scripting in a Batch File Pin
Programm3r31-Jul-06 23:55
Programm3r31-Jul-06 23:55 
AnswerRe: SQL Scripting in a Batch File Pin
toxcct31-Jul-06 23:57
toxcct31-Jul-06 23:57 
GeneralRe: SQL Scripting in a Batch File Pin
Programm3r31-Jul-06 23:59
Programm3r31-Jul-06 23:59 
AnswerRe: SQL Scripting in a Batch File Pin
David Crow1-Aug-06 3:16
David Crow1-Aug-06 3:16 
QuestionCompressing & Uncompressing of text file Pin
Suresh H31-Jul-06 23:37
Suresh H31-Jul-06 23:37 
AnswerRe: Compressing & Uncompressing of text file Pin
Marc Soleda1-Aug-06 0:12
Marc Soleda1-Aug-06 0:12 
GeneralRe: Compressing & Uncompressing of text file Pin
Suresh H1-Aug-06 0:16
Suresh H1-Aug-06 0:16 
GeneralRe: Compressing & Uncompressing of text file Pin
Marc Soleda1-Aug-06 0:58
Marc Soleda1-Aug-06 0:58 
AnswerRe: Compressing & Uncompressing of text file Pin
Hamid_RT1-Aug-06 0:22
Hamid_RT1-Aug-06 0:22 
GeneralRe: Compressing & Uncompressing of text file Pin
Suresh H1-Aug-06 0:43
Suresh H1-Aug-06 0:43 
QuestionActiveX function return pointer Pin
majco33331-Jul-06 23:33
majco33331-Jul-06 23:33 
QuestionGUI technologies [modified] Pin
A_Fa31-Jul-06 23:33
A_Fa31-Jul-06 23:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.