Solved

Want to create AppWizard skeleton app without Doc/View architecture

Posted on 2000-03-08
4
298 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 31

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to monitor remote shell execution on linux 9 107
format the code in java 6 110
haveThree challenge 22 123
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 477
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

730 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