Click here to Skip to main content
15,900,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Mouse as an erasing tool Pin
kudlaty7916-Aug-09 23:01
kudlaty7916-Aug-09 23:01 
Here is drawing code:

void COrder::OnLButtonDown(UINT nFlags, CPoint point)
{
if(drawing_status==1)
{
last_point = point;
}

CDialog::OnLButtonDown(nFlags, point);
}

void COrder::OnLButtonUp(UINT nFlags, CPoint point)
{
if(drawing_status==1)
{
UpdateWindow();
}

CDialog::OnLButtonUp(nFlags, point);
}
void COrder::OnMouseMove(UINT nFlags, CPoint point)
{
if(drawing_status==1)
{
CClientDC draw(this);
CPen pen;

if((nFlags & MK_LBUTTON)==MK_LBUTTON)
{
pen.CreatePen(PS_SOLID, 1, RGB(0,0,255));
draw.SelectObject(pen);

if(last_point.x<322 || last_point.x>626 || last_point.y<372 || last_point.y>596)
{
}
else
{
draw.MoveTo(last_point);
draw.LineTo(point);
}
last_point = point;
}
CDialog::OnMouseMove(nFlags, point);
}
GeneralRe: Mouse as an erasing tool Pin
Cedric Moonen16-Aug-09 23:14
Cedric Moonen16-Aug-09 23:14 
QuestionHow to double click desktop icon programatically? Pin
birajendu15-Aug-09 9:15
birajendu15-Aug-09 9:15 
QuestionRe: How to double click desktop icon programatically? Pin
David Crow15-Aug-09 10:40
David Crow15-Aug-09 10:40 
AnswerRe: How to double click desktop icon programatically? Pin
Stuart Dootson15-Aug-09 13:28
professionalStuart Dootson15-Aug-09 13:28 
GeneralRe: How to double click desktop icon programatically? Pin
birajendu15-Aug-09 18:35
birajendu15-Aug-09 18:35 
AnswerRe: How to double click desktop icon programatically? Pin
Graham Shanks15-Aug-09 23:04
Graham Shanks15-Aug-09 23:04 
QuestionHow to print an a 4x4 array in clockwise direction Pin
sharp_k15-Aug-09 8:59
sharp_k15-Aug-09 8:59 
AnswerRe: How to print an a 4x4 array in clockwise direction Pin
Chris Losinger15-Aug-09 9:36
professionalChris Losinger15-Aug-09 9:36 
AnswerRe: How to print an a 4x4 array in clockwise direction Pin
Moreno Airoldi15-Aug-09 9:59
Moreno Airoldi15-Aug-09 9:59 
GeneralRe: How to print an a 4x4 array in clockwise direction Pin
sharp_k15-Aug-09 21:14
sharp_k15-Aug-09 21:14 
GeneralRe: How to print an a 4x4 array in clockwise direction Pin
Moreno Airoldi15-Aug-09 22:54
Moreno Airoldi15-Aug-09 22:54 
GeneralRe: How to print an a 4x4 array in clockwise direction Pin
sharp_k16-Aug-09 4:59
sharp_k16-Aug-09 4:59 
GeneralRe: How to print an a 4x4 array in clockwise direction Pin
Moreno Airoldi16-Aug-09 7:50
Moreno Airoldi16-Aug-09 7:50 
GeneralRe: How to print an a 4x4 array in clockwise direction Pin
sharp_k16-Aug-09 8:50
sharp_k16-Aug-09 8:50 
GeneralRe: How to print an a 4x4 array in clockwise direction Pin
Moreno Airoldi16-Aug-09 9:35
Moreno Airoldi16-Aug-09 9:35 
GeneralRe: How to print an a 4x4 array in clockwise direction Pin
sharp_k16-Aug-09 13:58
sharp_k16-Aug-09 13:58 
QuestionVisual C++ 2008 runtime! Pin
Hadi Dayvary15-Aug-09 8:31
professionalHadi Dayvary15-Aug-09 8:31 
AnswerRe: Visual C++ 2008 runtime! Pin
Chris Losinger15-Aug-09 9:38
professionalChris Losinger15-Aug-09 9:38 
GeneralRe: Visual C++ 2008 runtime! Pin
Hadi Dayvary15-Aug-09 9:43
professionalHadi Dayvary15-Aug-09 9:43 
AnswerRe: Visual C++ 2008 runtime! Pin
Joe Woodbury15-Aug-09 10:51
professionalJoe Woodbury15-Aug-09 10:51 
GeneralRe: Visual C++ 2008 runtime! Pin
Hadi Dayvary15-Aug-09 19:33
professionalHadi Dayvary15-Aug-09 19:33 
AnswerRe: Visual C++ 2008 runtime! Pin
Stuart Dootson15-Aug-09 13:45
professionalStuart Dootson15-Aug-09 13:45 
QuestionWhat is the C++ syntax for c# "typeof(string)"? Pin
Member 391164315-Aug-09 6:50
Member 391164315-Aug-09 6:50 
AnswerRe: What is the C++ syntax for c# "typeof(string)"? Pin
Hristo-Bojilov15-Aug-09 7:16
Hristo-Bojilov15-Aug-09 7:16 

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.