mfc >> Control Design to improve their reuse ...

by Bernie » Mon, 26 Apr 2004 22:39:07 GMT

i have some propertypage
and i can add them to CPropertySheet which is include in a CDialog
but in order to improve reuse of object and ressource (define in an mfc
extension dll)
i would like create a control (with CPropertySheet and eventually CListBox
and other button) which could be easily add/insert inside other
dialog/ressource .....

i don't known if i must include my CPropertySheet in a CFormView or in
another control type ....

could you help me and show me the good way.....
all advice will be welcome ....

Similar Threads

1. Improving MFC Window UI design

I am planning to make improvements to the UI design of my MFC
application and I was wondering where to start?

Can anyone point me to some resources etc?
I tried googling but U couldnt find anyhing good...

Thanks guys!

2. Designing Components : WAS - Future reuse of code

3. Improving ugly(?) design: Data validation

4. software programs , beginner website design software , professional website design , nof komponenten , graphic design software , pc spiele bestellen , website design software comparison , kaufen versand , , free website design software , - CSharp/C#

5. Custom Control Design Time DataBindings


I have a custom composite control which has a label and a textbox. When I 
add an instance of the control to a WinForm project I need to link it to a 
typed dataset.  Now the VS design time properties on the control has a Data 
 > (DataBindings) > Tag. When I set the value of the Tag Property to my 
datasource and run the project nothing happens. Then I open my Advanced pane 
and I set the Value property = to the same DataSource and everything works 

My question:

1. How do I add a custom property under Data > (DataBindings) ? (I have used 
cutom design time attributes to add my own categories but I cant seem to 
figure that one out)


6. Creating control arrays at design time. - CSharp/C#

7. Design Question WRT controlling access to private methods

I have a situation where I need to control the creation of a class.
I need to be able to create it externally but only by classes that I define.
To accomplish this I thought of the following process:

Define a delegate that returns an instance of my class.
Pass this an instance of this delegate to any classes that I want to be 
able to create instances of myclass.


//Safe class
using System;
using System.Collections.Generic;
using System.Text;

namespace DelegateCreation
     public class MySafeClass
         public delegate MySafeClass CreateMySaveClassDelegate();

         private MySafeClass()

         private static MySafeClass Create()
             return new MySafeClass();

         public static void Load()
             List<MySafeClass> instances = 
ClassCreator.CreateMySafeClass(new CreateMySaveClassDelegate(Create));

//Class creator
using System;
using System.Collections.Generic;

namespace DelegateCreation
     public class ClassCreator

         public static List<MySafeClass> 
CreateMySafeClass(MySafeClass.CreateMySaveClassDelegate myDelegate)
             List<MySafeClass> returnList = new List<MySafeClass>();
             return returnList;

8. Compound Custom Control - How to Trap Resize in Design Mode - CSharp/C#