| |

VerySource

 Forgot password?
 Register
Search
View: 1009|Reply: 14

Very poor question, MDI form!

[Copy link]

1

Threads

9

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-12-14 11:00:02
| Show all posts |Read mode
I use Delphi. Recently, I want to know about VC and want to make an MDI program, but I am confused by what documents, views, and frameworks. I don’t know how to start.
    My idea is very simple. Create a main MDI window and two sub-windows (some controls on the top, such as ListCtrl, Button, etc.). No documents or views are needed.
    Just create a new Form in Delphi, set its FormStyle property to fsMDIChild, and then write the following code in the main window to display the word window.
    Form2:=TForm2.Create(Application);
    Form2.Show;
    Write Action:=caFree in the OnClose function of Form2 to click the "X" button on the Form2 form to close the Form2 form.

my question:
   1. How to create and design Form2 sub-forms in VC.
   2. How to call my Form2 form in the main window.
   3. How to close the Form2 form.
Note: I am very good, please write clearly step by step, don't just write one or two sentences. Thank you.
Reply

Use magic Report

0

Threads

32

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-12-14 14:00:01
| Show all posts
When creating the MFC wizard, in the last step, let your view class base class (base class) select CFormView
Reply

Use magic Report

0

Threads

32

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 United States

Post time: 2020-12-14 14:30:01
| Show all posts
To create a new View, just select the new menu. As for closing, just click the "X" button on the form,
You don't need to write a single line of program in MFC.
Reply

Use magic Report

0

Threads

55

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-12-14 19:00:01
| Show all posts
You can create a project based on the main dialog box, and then build a Form form on the main dialog box.
Reply

Use magic Report

1

Threads

9

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-12-14 19:45:01
| Show all posts
TO: Li Xiaoyao
I want to customize the View, but don't want to use the new menu. and. I want to put controls on the View
Reply

Use magic Report

1

Threads

9

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-12-14 20:30:01
| Show all posts
To:rsq666
I want to use MDI forms instead of dialog-based programs.
How do I design my own form and call it
Reply

Use magic Report

1

Threads

9

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-12-14 22:45:01
| Show all posts
I want to do something like a management system. Click a menu to display a sub-form. The functions and controls of each form are different.
Delphi is very simple, why is VC so complicated.
Reply

Use magic Report

0

Threads

32

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 United States

Post time: 2020-12-14 23:30:01
| Show all posts
You can place controls on CFormView, just like you do in Delphi.
Try to create a new MFC MDI project based on CFormView, just use it.
Reply

Use magic Report

1

Threads

9

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-12-15 02:30:01
| Show all posts
Heroes make it clear, I don’t understand how to create CFormView
Is it to insert a dialog box in ResourceView, change his base class to CFormView
Reply

Use magic Report

0

Threads

32

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-12-15 06:45:01
| Show all posts
> ... how to create a CFormView
--------------------------
See my first reply

If you want to click different menus to create different forms, you can add your own menu items in MFC. After clicking, your own dialog will pop up. What you want to do in the dialog is up to you.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list