Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am to new MFC . Actually I want to open New window From Main Window.Please can any body here to help me.

Like in MDI when i click New then the new dwindow is opened like this i want to click another Menu entry and i want on clicking this another window should be opened according to my functionality unlike when pressing New Menu i dont want New window a blank window i want to apply my own functionalit on it on dialog then open it through a New window Hope Now clear to All.
Posted
Updated 19-Jul-11 5:58am
v2
Comments
ThatsAlok 19-Jul-11 8:36am    
Hi, i know you are new to programming world. would please let your fellow programmer here know what type of window you want to open. i.e. is it MDI application or you want to invoke dialog box!
ahsan45 19-Jul-11 10:20am    
Yes it is a MDI Application.
Actually i want to develop a Phone Book Application in MFC .
What i want actuallu i want a Main window will open first and then there should be Record Menu Entry by cliking it a list will open in which many sub items like add record, delete record, serach record. and i want when i click on of those menu items then according to their functionalit another window should be open for example when i click on search record another window should be open in which i insert some key to serach that record and similarly this for others Please if you know about that help me. Thanks
.

1 solution

Given the above details, it's not easy to understand which part of this application you are having difficulty with. Take a look at the samples here[^] on MSDN and see if some of them may help you.
 
Share this answer
 
Comments
ahsan45 19-Jul-11 16:32pm    
Actually i want that when i click a Menu entry of the Main Window then another Window get displayed.This is My Main Problem .
Richard MacCutchan 19-Jul-11 17:27pm    
OK, well you need to capture the relevant command from your menu and then create the new window and show it.
Which part of this do you need help with? If you mean all of it then you need to go to the link I provided above and use the samples to understand how MDI applications are constructed.
ahsan45 20-Jul-11 4:33am    
Yes you get it , when i click the menu entry how i able to create the window fo my own desir and open it by clicking it . Thats the thing in which i get stuck. Please help me.
ahsan45 20-Jul-11 4:39am    
I Want to put my own functionality on the window , this window is not like when i click on New Menu entry then the new window will open but this is window which is blank which is the copy of the same Main Window , Actually i want that window which have my own functionality on it Thanks. Please give some tutorial on it or any helping material . Thanks Again .
Richard MacCutchan 20-Jul-11 6:13am    
I don't understand what your problem is. you have an MDI application so you must know how to open or create a new window. Just add the command handler for your menu command and create the new window as required. I already gave you a link to the MSDN tutorials on the subject; if you do not know how to use MFC then that would be the best place to start. You can also look at the Articles here on CodeProject, where you will find lots of useful samples.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900