Click here to Skip to main content
15,895,799 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson18-Feb-09 22:46
professionalStuart Dootson18-Feb-09 22:46 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50219-Feb-09 1:23
John50219-Feb-09 1:23 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson19-Feb-09 2:07
professionalStuart Dootson19-Feb-09 2:07 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50219-Feb-09 2:49
John50219-Feb-09 2:49 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson19-Feb-09 3:34
professionalStuart Dootson19-Feb-09 3:34 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box [modified] Pin
John50219-Feb-09 7:02
John50219-Feb-09 7:02 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson19-Feb-09 7:10
professionalStuart Dootson19-Feb-09 7:10 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50219-Feb-09 8:28
John50219-Feb-09 8:28 
Hi Stuart,
I am using below code snippet :
GetClientRect( &deflatedClientRect );
deflatedClientRect.DeflateRect( TB_WIDTH, TB_WIDTH );
slider_bar1.GetThumbRect( &thumbRect1);
slider_bar1.ClientToScreen( &thumbRect1);
ScreenToClient(&thumbRect1);
m_bottom_slider_control.GetThumbRect(&thumbRect2);
m_bottom_slider_control.ClientToScreen(&thumbRect2);
ScreenToClient(&thumbRect2);
ptStart.x = thumbRect1.CenterPoint().x;
ptStart.y = thumbRect1.bottom;
ptEnd.x = thumbRect2.CenterPoint().x;
ptEnd.y = thumbRect2.bottom;
x1 = ptStart.x; y1 = ptStart.y; x2 = ptEnd.x; y2 = ptEnd.y;
int nOldmode=dc.SetROP2(R2_NOTXORPEN);
dc.MoveTo(old_x1,old_y1);
dc.LineTo(old_x2,old_y2);
dc.MoveTo(x1,y1);
dc.LineTo(x2,y2);
old_x1 = x1;
old_y1 = y1;
old_x2 = x2;
old_y2 = y2;

I am writing below code in OnPaint function, when i moved vertical scroll bar down it is getting erasing ..
please tell me where i am going wrong..?

thanks in advance...
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson19-Feb-09 9:03
professionalStuart Dootson19-Feb-09 9:03 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50219-Feb-09 9:18
John50219-Feb-09 9:18 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson19-Feb-09 9:59
professionalStuart Dootson19-Feb-09 9:59 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50219-Feb-09 10:10
John50219-Feb-09 10:10 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson20-Feb-09 2:17
professionalStuart Dootson20-Feb-09 2:17 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50222-Feb-09 1:32
John50222-Feb-09 1:32 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John5021-Mar-09 19:07
John5021-Mar-09 19:07 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson1-Mar-09 20:56
professionalStuart Dootson1-Mar-09 20:56 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John5021-Mar-09 21:58
John5021-Mar-09 21:58 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson1-Mar-09 22:06
professionalStuart Dootson1-Mar-09 22:06 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John5021-Mar-09 22:28
John5021-Mar-09 22:28 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson1-Mar-09 23:14
professionalStuart Dootson1-Mar-09 23:14 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John5022-Mar-09 0:13
John5022-Mar-09 0:13 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson2-Mar-09 0:39
professionalStuart Dootson2-Mar-09 0:39 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50212-Feb-09 1:13
John50212-Feb-09 1:13 
QuestionHeap corruption probelm when i try to return std::string from function in dll Pin
dhpatil15-Feb-09 1:54
dhpatil15-Feb-09 1:54 
AnswerRe: Heap corruption probelm when i try to return std::string from function in dll Pin
Stuart Dootson5-Feb-09 2:47
professionalStuart Dootson5-Feb-09 2:47 

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.