I using MoveTo and LineTo functions in OnPaint only... i have written remaining code in OnInitDialog. becuase i want to move the line across the images.
but still i am getting same problem..
Any clue regarding this..?
Thanks for your help, I am able to draw veritcal line successfully across the images, we have given static pixels information for drawing a line right..? but now i want to move line across the images whenever i have clicked on button..
Can you please help me regarding line drawing.. I want to draw line with the slider thumb positions.
I am using below code snippet for drawing line..
GetClientRect( &deflatedClientRect );
deflatedClientRect.DeflateRect( TB_WIDTH, TB_WIDTH );
slider_bar1.GetThumbRect( &thumbRect );
slider_bar1.ClientToScreen( &thumbRect );
ptStart.x = thumbRect.CenterPoint().x;
ptStart.y = TB_WIDTH;
ptEnd.x = ptStart.x;
ptEnd.y = deflatedClientRect.bottom;
using this code i will get the slider bar thumb position in terms of pixels, so using MoveTo and LineTo funtions i am drawing line..
but here i am not offsetting the pixels, so the line is getting erasing while moving scroll bar down..
Can you please help me regarding this.. please kindly give me reply as i have to deliver this app by tomorro... please
Thanks responding on this.. actually i have two horizontal sliders in between them i need to draw vertical line..
so using that code snippet i am able to get starting position of the top slider,
so i am using that..actually i also want to move that line along with slider positions... so that's the reason i am using that..
Here's the entirety of my OnPaint code. image1_ and image2_ are both member variables of type CImage. baseSize_ (also a member variable) is the initial size of the dialog. offset_ (also a member variable) is a CPoint holding the offset from the top-left point of the area on which I draw to the top-left of the visible area (i.e. the offset due to scrolling). slider_ is a member variable of type CSliderCtrl.
based on your code snippet i came to know that i did small mistake in my code..., now i am able to get that.. but when i move scroll down the previous line is not getting erasing.. the previous line is still appearing..,
and one more thing.. when i move vertical bar scroll very down, then the line is also getting drawing on entire window..
Can you please help me regarding this..?
Thanks in advance..
Last Visit: 31-Dec-99 19:00 Last Update: 30-Nov-23 17:22