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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mixing Dialog-based and SDI apps 1

Status
Not open for further replies.

JillyT

Programmer
Jul 11, 2002
23
CA
Is it possible to call an SDI app from a dialog-based app?? Suggestions for how to do this...are there existing functions or does the code essentially have to be copied from the app::initinstance file of the SDI app to the button command of the calling dialog along with all SDI files required? Thanks oodles!
 
>> but it is still closing the whole application when I try
>> to exit the document frame.

Yes you will have to take care of that. When you use the close button in the top/right of the frame it should not close your dialog/application. If it does, you have other problems.

However the frames SystemMenu/Close and File/Exit menu items should close the entire applcation since they send the ID_APP_EXIT message.

So you need to resolve those issues. There is more than one way to do that. Here are some:

And a handler to your frame for ID_APP_EXIT and close the window.

CWnd::SendMessage( WS_CLOSE);

In CMainFrame::OnCreate modify the frame style and remove the system menu style

CWnd::ModifyStyle( WS_SYSTEM,0L);



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top