Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form problem

Status
Not open for further replies.

piaro

Programmer
Jan 15, 2006
1
RO
Hi.
I want to run a form when i click a button from other form.
 
In the code for the OnButtonFunction() put this code.

Code:
	// Open your form (dialog box)
	CYourDlg* MyDialog = new CYourDlg;
	MyDialog->Create(IDD_YOURDIALOGBOX, NULL);
	MyDialog->ShowWindow(SW_SHOW);

You have to creat CYourDlg form. Change CYourDlg to what you have named your form that you want to open. Also, use the IDD_ that is in your properties box for your form. You can use MyDialog or change it to your taste.

HyperEngineer
If it ain't broke, it probably needs improvement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top