Click to See Complete Forum and Search --> : how can i move my CRect rectangle
maxiis
January 9th, 2007, 10:33 AM
hello guy im have a little problem with my CRect rectangle.
i have draw a rect on a dialog box but how can i move the rect by using mouse click and drag. move it current position? Any function for me to click and drag the location of my rect?
any help will be Great : )
Mike Harnad
January 9th, 2007, 02:12 PM
Take a look at CDC:: DrawDragRect ().
maxiis
January 16th, 2007, 12:58 AM
Take a look at CDC:: DrawDragRect ().
void DrawDragRect(
LPCRECT lpRect,
SIZE size,
LPCRECT lpRectLast,
SIZE sizeLast,
CBrush* pBrush = NULL,
CBrush* pBrushLast = NULL
);
thank Mike for ur reply.
i have some more qns to ask. i have tried DrawDragRect but how i know of my Size and IpRectLast and sizeLast of my parameter of the Rect i wan to drag.
isiz i have to create a varible to store it value?
any help will be Great : )
Mike Harnad
January 16th, 2007, 09:00 AM
This CodeGuru archive (http://www.codeguru.com/forum/archive/index.php/t-131726.html) should help explain it.
maxiis
January 22nd, 2007, 08:32 PM
hi MIKE thank for ur reply and u reply have been a great help to me : )
sorry i got a question to ask if i using CRectTracker to draw a Rect. but now i need to drag it wiithin dialog. so how i going to start.
hope i not asking silly question.
any help will be great!
Mike Harnad
January 23rd, 2007, 08:50 AM
I don't understand your question. Are you trying to use CRectTracker from within a dialog? What is it you are trying to do?
maxiis
January 23rd, 2007, 06:12 PM
yes im using CRectTracker to draw REct. than use CRectTracker Draw to draw it Rect out.
Mike Harnad
January 25th, 2007, 10:35 AM
Have a look at Tracker (http://msdn2.microsoft.com/en-gb/library/ms177537(VS.80).aspx) on MSDN.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.