banner.jpg (64767 bytes)
bullet Features
bullet Tutorials
bullet F.A.Q.s
bullet Downloads
bullet Articles
bullet Open Architecture
bullet Control Development Kit
bullet RAD Foundation Class
bullet Enhanced IntelliSense
bullet Samples
bullet Migration Center
bullet Links
Knowledgebase
 

Editing resources of RAD C++ controls

Do not edit them from VC++ resource tab, rather open the resource file in VC++ editor using file - open menu item and then edit them.

 

How to Display document and application classes as forms

Note: In Appwizard generated projects, RadVC only displays CWnd derived classes as forms is to enable users to add RFC / RAD C++ controls in them. In a document-view application, it is not very customary to add C++ controls, especially visual RAD C++ controls in application and document classes. To make your document and application classes behave as forms, you manually need to do whatever RadVC does with CWnd - derived classes. This includes adding function prototypes such as CreateControls(..) etc. in your document and application classes. Once the prototypes are added, refresh your active project using RadVC's "Refresh Project Info", the application and document classes should now show as forms. 

 

What's the method of closing an application programmatically ?

Use 

(1) If you are in a form's class use:

::PostMessage(WM_CLOSE);

(2) From anywhere in the application, use:

AfxGetMainWnd()->PostMessage(WM_CLOSE);

 

 

How can I Change a Non-MDI Form to an MDI Form?

If you have already started a project with the default form options (MDIForm checkbox unchecked) but later decide to  make the startup form an MDIForm, then here is what you need to do:

(1) First, open the header(.h) and implementation(.cpp) files of the forms. Change all instances of base class of the form from CRForm to CRMdiForm. CRMdiForm is the RFC class that implements MDI form functionalities.

(2) If your form was created using "3-way RAD" option unchecked, then there is little more work you need to do. First check if "3-way RAD" option was selected while the form was first created [ Please check the next Knowledgebase item to do so]. If it was created without "3 - way RAD" option, then open the implemention file (.cpp) of the form and change the line "m_nPropStringID = IDS_PROP_FORMXXX;" to "m_rect = CRect(0, 0, 300);" With this change, the form properties will be set to default, thus you may need to change them again to their old values from the property window.

Please make sure to refresh your active project using RadVC's "Refresh Project Info" option after you make the change.

How do I Know if "3-way RAD" option was selected when a form was Created?

Open the implementation file(.cpp) of the form and check the "constructor" of the form class.

If your form was created without "3 - Way RAD" option, then the constructor should look like the following:

CForm1::CForm1()
{
//{{AFX_FORM_DATA_START
m_nPropStringID = IDS_PROP_FORM1;
//}}AFX_FORM_DATA_END
}

If your form was created with "3 - Way RAD" option, then the constructor should look like the following

CForm1::CForm1()
{
//{{AFX_FORM_DATA_START
m_rect = CRect(0, 0, 300, 300);
//}}AFX_FORM_DATA_END
}

Please make sure to refresh your active project using RadVC's "Refresh Project Info" option after you make the change.

 

 

 

 

 

 

[ Home ][ Order Now ][Feedback][ Contact Us ][ About CapitolSoft ]
[ Features ][ Tutorial ][ Samples ][ F.A.Q.s ][ Download ][CDK]