?
Solved

Want to create AppWizard skeleton app without Doc/View architecture

Posted on 2000-03-08
4
Medium Priority
?
302 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 300 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

770 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