Click here to Skip to main content
15,911,132 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WindowLess Rich Text Pin
ForNow10-Feb-09 13:54
ForNow10-Feb-09 13:54 
QuestionRedrawing lines draw by a user Pin
en9ap10-Feb-09 6:27
en9ap10-Feb-09 6:27 
AnswerRe: Redrawing lines draw by a user Pin
Stuart Dootson10-Feb-09 6:54
professionalStuart Dootson10-Feb-09 6:54 
AnswerRe: Redrawing lines draw by a user Pin
led mike10-Feb-09 6:54
led mike10-Feb-09 6:54 
AnswerRe: Redrawing lines draw by a user Pin
Cedric Moonen10-Feb-09 7:59
Cedric Moonen10-Feb-09 7:59 
GeneralRe: Redrawing lines draw by a user Pin
en9ap11-Feb-09 4:39
en9ap11-Feb-09 4:39 
QuestionToggling highlighting through a CListCtrl in the correct order Pin
Sternocera10-Feb-09 6:01
Sternocera10-Feb-09 6:01 
QuestionHow can i modify my picture control to automatically draw line? Pin
z01e10-Feb-09 5:50
z01e10-Feb-09 5:50 
I've got a class that handle picture control to load image. (ex. m_pic1.SetBitmap("pic.bmp")) '

and i know how to draw line if i put these dcMem.MoveTo(x1,y1) & dcMem.LineTo(x2,y2) into this

(These code are quote from class that that handle picture control)
void CPictureBox::ShowBitmap(CPaintDC *pdc)<br />
 {<br />
  CDC dcMem;<br />
  dcMem.CreateCompatibleDC(pdc);<br />
  CRect lRect;<br />
  GetClientRect(lRect);<br />
  lRect.NormalizeRect();<br />
  CBitmap* pOldBitmap = (CBitmap*)dcMem.SelectObject(&m_bmpBitmap);<br />
  //put it here<br />
  pdc->StretchBlt(0,0,lRect.Width(),lRect.Height(),&dcMem,0,0,bm.bmWidth,bm.bmHeight,SRCCOPY);<br />
 }


and i got a struct that contain a coordinate like this

struct coord
{
int beginx;
int beginy;
int endx;
int endy;
};

Could you please help me find the way to modify this class to automatically draw lines likes

ex. m_pic1.SetBitmap("pic.bmp",coord)

Thank you for your help.

p.s. I'm a newbie to these codes. It would be pleased if you gave me some example with your answer. Thank you.
QuestionBack to basics; just started learnin C++ Pin
EliottA10-Feb-09 5:46
EliottA10-Feb-09 5:46 
AnswerRe: Back to basics; just started learnin C++ Pin
prasad_som10-Feb-09 6:39
prasad_som10-Feb-09 6:39 
AnswerRe: Back to basics; just started learnin C++ Pin
Eytukan10-Feb-09 7:24
Eytukan10-Feb-09 7:24 
GeneralRe: Back to basics; just started learnin C++ Pin
EliottA10-Feb-09 7:32
EliottA10-Feb-09 7:32 
GeneralRe: Back to basics; just started learnin C++ Pin
toxcct10-Feb-09 7:51
toxcct10-Feb-09 7:51 
GeneralRe: Back to basics; just started learnin C++ Pin
EliottA10-Feb-09 7:52
EliottA10-Feb-09 7:52 
GeneralRe: Back to basics; just started learnin C++ Pin
toxcct10-Feb-09 7:58
toxcct10-Feb-09 7:58 
GeneralRe: Back to basics; just started learnin C++ Pin
EliottA10-Feb-09 8:01
EliottA10-Feb-09 8:01 
GeneralRe: Back to basics; just started learnin C++ Pin
Eytukan10-Feb-09 8:31
Eytukan10-Feb-09 8:31 
GeneralRe: Back to basics; just started learnin C++ Pin
EliottA10-Feb-09 8:33
EliottA10-Feb-09 8:33 
GeneralRe: Back to basics; just started learnin C++ Pin
Eytukan10-Feb-09 8:37
Eytukan10-Feb-09 8:37 
QuestionVisual Studio 2008 Lost Class View of XXXview and a couple of other classes. Pin
Desmond Mardle10-Feb-09 5:44
Desmond Mardle10-Feb-09 5:44 
AnswerRe: Visual Studio 2008 Lost Class View of XXXview and a couple of other classes. Pin
prasad_som10-Feb-09 6:41
prasad_som10-Feb-09 6:41 
GeneralRe: Visual Studio 2008 Lost Class View of XXXview and a couple of other classes. Pin
Desmond Mardle10-Feb-09 7:32
Desmond Mardle10-Feb-09 7:32 
GeneralRe: Visual Studio 2008 Lost Class View of XXXview and a couple of other classes. Pin
Niklas L10-Feb-09 21:21
Niklas L10-Feb-09 21:21 
GeneralRe: Visual Studio 2008 Lost Class View of XXXview and a couple of other classes. Pin
Desmond Mardle10-Feb-09 23:16
Desmond Mardle10-Feb-09 23:16 
QuestionDumping the call stack to a log at runtime Pin
Code-o-mat10-Feb-09 5:25
Code-o-mat10-Feb-09 5:25 

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.