Solved

Want to create AppWizard skeleton app without Doc/View architecture

Posted on 2000-03-08
4
291 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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 85
repeatEnd java challenge 42 84
move a line in eclipse 3 80
noX challenge 17 91
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

932 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

12 Experts available now in Live!

Get 1:1 Help Now