How to call a form from another form?
Printable View
How to call a form from another form?
Is this a C++ question?
yes in vc++
I'm not sure what you mean with Forms.. I think you mean dialogs? and what do you mean with calling them
'Forms' is just what they are called in VB, purusingh. In C or C++ or pretty much any other language they're just windows. A form in VB is fundamentally just a specialised type of window with some stuff tacked on.
What are you trying to do with one window from the other?
Actually I want to make a database application.In which there could some forms and according to demand I want to open different form.
Please stop talking about forms, they don't exist in C++ :)
Anyway, to create a new dialog from whatever window use DialogBox api, but you need to be a bit more specific for me to get you some code..
I don't remember windows existing in C++ either.
I know to open dialog. We do
Dialog a;
a.DoModal();
In mfc there are view base on form databaseform ......
Suppose there are 2 views based on formview.
Now I want to call the second view form the first one so that both of them are visible.
Well, no ;) but the API you use to make GUIs in Windows is window-based.Quote:
Originally posted by amac
I don't remember windows existing in C++ either.
As I suspected, he's talking about MFC. There are forms in MFC (CFormView).
You can't "call" the view, what you usually do is create a splitter window with the two views contained. Search the forum on CSplitterWnd, there was a thread a short while ago.