|
-
May 11th, 1999, 05:27 PM
#1
Resizeable GroupBox Frame
I need to create a transparent frame (like a group box), only it needs to be resizeable by the user (unlike the group box in this case). I should also be able to drag and move them within my dialog, apart from being able to resize them.
Could someone provide some input?
-
May 11th, 1999, 05:41 PM
#2
Re: Resizeable GroupBox Frame
You may need to drag a bounding rectangle around on the screen. Check out CRectTracker. This may be what you need.
I implemented something like this a while ago. The trick was to create the group box dynamically and place it in the window. When the user wanted to resize the group box, the CRectTracker would appear around the group box. The user would move the CRectTracker around. When the user stops moving the tracking rectangle, the groupbox is sized and moved to the last position of the CRectTracker (and the CRectTracker is destroyed).
Regards,
Paul McKenzie
-
May 11th, 1999, 06:07 PM
#3
Re: Resizeable GroupBox Frame
Yeah, that sounds like more or less what i need to do.. Would u have the snippet of code by any chance with u.. I also thought that CRectTrackers need to be used only with COleClientItem classes or in general with containers. Please respond. Thanks for this Paul
-
May 12th, 1999, 08:32 PM
#4
Re: Resizeable GroupBox Frame
I don't have the code, since I don't work for the company anymore. But basically, all I did was to create a CRectTracker dynamically, giving the dimensions, and use the CRectTracker functions. (HitTest is one where you would want to look at especially). Here is the snippet from MSDN concerning CRectTracker:
"The CRectTracker class allows an item to be displayed, moved, and resized in different fashions. Although the CRectTracker class is designed to allow the user to interact with OLE items by using a graphical interface, its use is not restricted to OLE-enabled applications. It can be used anywhere such a user interface is required ."
Note the last two sentences.
Regards,
Paul Mckenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|