Solved

Want to create AppWizard skeleton app without Doc/View architecture

Posted on 2000-03-08
4
289 Views
Last Modified: 2013-11-20
I would like to create a skeleton application in MS Vis C++ 5.0 much like you get when you use the AppWizard for a SDI/MDI application (you know, with the frame, toolbar, status bar, etc. all in working order), but without the Doc/View architecture.  If I create a simple Win32 app, none of this is here.  I suppose this would not be too bad, but also the Resource Editor and several other parts of the dev environment don't even show up.
Anyhow, has anyone done this before?  If I should merely create a Doc/View app and then remove the Doc/View stuff, what is the proper way to do that?

Thanks!
0
Comment
Question by:Mournblade
4 Comments
 
LVL 30

Expert Comment

by:Zoppo
ID: 2595399
Hi Mournblade,

Just a hint: You should upgrade to VC++6.0, because it's MFC EXE AppWizard contains a checkbox 'Document/View architecture support' which can be unchecked...

ZOPPO
0
 

Expert Comment

by:Subramanya
ID: 2598304
I guess, Probably you don't need
Document class but you need the
View support,In that case you can remove
2 files related to document from the
project work place, during compiling
it will give some errors.Comment out those lines and logically  modify
it will workout.

 If your application is non GUI related
you can go for ATL com wizard in the
main Appwizard.Go through the Help,
Detailed steps are given
0
 

Accepted Solution

by:
bertp earned 100 total points
ID: 2724009
Basically, Just leave out the doc/view/doctemplate stuff.

in the initinstance, new your framewnd and set pMainWnd to point to a CFrameWnd derived class that contains
as members the toolbars and statusbars
you want to use.

if you want to draw on the fram window just add a wm_paint hander...

I have vc6.. here is how the wizard generates the InitInstance function,
but if you need it I can send you all of the source

BOOL CNodocviewApp::InitInstance()
{
      AfxEnableControlContainer();

      // Standard initialization
      // If you are not using these features and wish to reduce the size
      //  of your final executable, you should remove from the following
      //  the specific initialization routines you do not need.

#ifdef _AFXDLL
      Enable3dControls();                  // Call this when using MFC in a shared DLL
#else
      Enable3dControlsStatic();      // Call this when linking to MFC statically
#endif

      // Change the registry key under which our settings are stored.
      // TODO: You should modify this string to be something appropriate
      // such as the name of your company or organization.
      SetRegistryKey(_T("Local AppWizard-Generated Applications"));


      // To create the main window, this code creates a new frame window
      // object and then sets it as the application's main window object.

      CMainFrame* pFrame = new CMainFrame;
      m_pMainWnd = pFrame;

      // create and load the frame with its resources

      pFrame->LoadFrame(IDR_MAINFRAME,
            WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
            NULL);




      // The one and only window has been initialized, so show and update it.
      pFrame->ShowWindow(SW_SHOW);
      pFrame->UpdateWindow();

      return TRUE;
}

0
 

Author Comment

by:Mournblade
ID: 2739597
Would you believe that something seemingly so simple has been an issue for months?  I've hacked away at this for awhile.  I finally figured it out, and actually it's pretty easy - very much as you stated above.  But I got all kinds of crazy answers.  Hehe. Anyway, although I'd solved it, your answer is pretty good.  Thanks.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Need to retreive data from .TFS file exported by DVR 8 166
iSeries DB2 Query 2 83
modThree challenge 4 64
zeroMAx challenge 20 76
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now