Click here to Skip to main content
15,909,898 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Sir, Windows allots 4 GB space for Proccess can you tell me Pin
Jonathan [Darka]28-Jul-06 0:55
professionalJonathan [Darka]28-Jul-06 0:55 
Questionprogrammatic gamma correction for dual monitors Pin
srboisvert28-Jul-06 0:42
srboisvert28-Jul-06 0:42 
AnswerRe: programmatic gamma correction for dual monitors Pin
Blake Miller1-Aug-06 12:56
Blake Miller1-Aug-06 12:56 
Questionquick network functionality ? Pin
ldsdbomber28-Jul-06 0:42
ldsdbomber28-Jul-06 0:42 
QuestionPrintable area Pin
Wim Engberts28-Jul-06 0:21
Wim Engberts28-Jul-06 0:21 
QuestionDraggable Circle when Mose is inside the Circle Area. Pin
uday kiran janaswamy27-Jul-06 23:57
uday kiran janaswamy27-Jul-06 23:57 
AnswerRe: Draggable Circle when Mose is inside the Circle Area. Pin
Wim Engberts28-Jul-06 0:26
Wim Engberts28-Jul-06 0:26 
GeneralRe: Draggable Circle when Mose is inside the Circle Area. Pin
uday kiran janaswamy28-Jul-06 0:58
uday kiran janaswamy28-Jul-06 0:58 
Hi Edinburg,

Please help me out. I am sending the code what i have written to draw the Circle.

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


void CPaintingView::OnLButtonDown(UINT nFlags, CPoint point)
{
Anchor.x = point.x;
Anchor.y = point.y;
OldPoint.x = Anchor.x;
OldPoint.y = Anchor.y;
CScrollView::OnLButtonDown(nFlags, point);
}

void CPaintingView::OnLButtonUp(UINT nFlags, CPoint point)
{
DrawTo.x = point.x;
DrawTo.y = point.y;
CClientDC dc(this);
if(bEllipseFlag)
{
SetCursor(AfxGetApp()->LoadCursor(IDC_CURSOR1));
dc.SelectStockObject(NULL_BRUSH);
dc.Ellipse(Anchor.x, Anchor.y, DrawTo.x, DrawTo.y);
}

CScrollView::OnLButtonUp(nFlags, point);
}

void CPaintingView::OnMouseMove(UINT nFlags, CPoint point)
{
int nOldMode;
CClientDC* pDC = new CClientDC(this);

if((nFlags && MK_LBUTTON) && bEllipseFlag)
{
SetCursor(AfxGetApp()->LoadCursor(IDC_CURSOR1));
nOldMode = pDC->GetROP2();
pDC->SetROP2(R2_NOT);
pDC->SelectStockObject(NULL_BRUSH);
pDC->Ellipse(OldPoint.x, OldPoint.y, Anchor.x, Anchor.y);
pDC->Ellipse(Anchor.x, Anchor.y, point.x, point.y);
OldPoint.x = point.x;
OldPoint.y = point.y;
pDC->SetROP2(nOldMode);

szPosx.Format("%d",point.x);
szPosy.Format("%d",point.y);
Res = "x=";
Res += szPosx;
Res += ",";
Res += "y=";
Res += szPosy;
CMainFrame* pFrameParent = (CMainFrame *)GetParentFrame();
pFrameParent->m_wndStatusBar.SetPaneText(4,Res);

}
delete pDC;

CScrollView::OnMouseMove(nFlags, point);
}


void CPaintingView::OnLButtonDblClk(UINT nFlags, CPoint point)
{
if(bEllipseFlag == true)
{
CRect rect;
ClientToScreen(&rect);
GetClientRect(&rect);
InvalidateRect(rect,TRUE);
}
CScrollView::OnLButtonDblClk(nFlags, point);
}
//===========================================================================

Please help me out.


uday
GeneralRe: Draggable Circle when Mose is inside the Circle Area. Pin
Wim Engberts28-Jul-06 1:26
Wim Engberts28-Jul-06 1:26 
GeneralRe: Draggable Circle when Mose is inside the Circle Area. Pin
uday kiran janaswamy28-Jul-06 1:32
uday kiran janaswamy28-Jul-06 1:32 
QuestionHow to add files into External dependencies fileview Pin
Vinod Moorkkan27-Jul-06 23:41
Vinod Moorkkan27-Jul-06 23:41 
AnswerRe: How to add files into External dependencies fileview Pin
toxcct27-Jul-06 23:47
toxcct27-Jul-06 23:47 
AnswerRe: How to add files into External dependencies fileview [modified] Pin
Naveen27-Jul-06 23:58
Naveen27-Jul-06 23:58 
GeneralRe: How to add files into External dependencies fileview Pin
Vinod Moorkkan28-Jul-06 0:41
Vinod Moorkkan28-Jul-06 0:41 
GeneralRe: How to add files into External dependencies fileview Pin
Naveen28-Jul-06 0:45
Naveen28-Jul-06 0:45 
QuestionIActiveDesktop error Pin
Sarath C27-Jul-06 23:32
Sarath C27-Jul-06 23:32 
AnswerRe: IActiveDesktop error Pin
Hamid_RT28-Jul-06 0:29
Hamid_RT28-Jul-06 0:29 
GeneralRe: IActiveDesktop error Pin
Sarath C28-Jul-06 0:43
Sarath C28-Jul-06 0:43 
GeneralRe: IActiveDesktop error Pin
Hamid_RT28-Jul-06 0:56
Hamid_RT28-Jul-06 0:56 
AnswerRe: IActiveDesktop error Pin
Stephen Hewitt28-Jul-06 1:10
Stephen Hewitt28-Jul-06 1:10 
QuestionAfxBeginThread Pin
tanarnelinistit27-Jul-06 23:22
tanarnelinistit27-Jul-06 23:22 
AnswerRe: AfxBeginThread Pin
Cedric Moonen27-Jul-06 23:26
Cedric Moonen27-Jul-06 23:26 
QuestionRe: AfxBeginThread Pin
tanarnelinistit27-Jul-06 23:38
tanarnelinistit27-Jul-06 23:38 
AnswerRe: AfxBeginThread Pin
Cedric Moonen27-Jul-06 23:42
Cedric Moonen27-Jul-06 23:42 
QuestionRe: AfxBeginThread Pin
tanarnelinistit28-Jul-06 0:37
tanarnelinistit28-Jul-06 0:37 

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.