Solved

Want to create AppWizard skeleton app without Doc/View architecture

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeatEnd java challenge 42 84
lucky13 challenge 11 147
modThree challenge 4 91
Remove Password Protection from pdf (with password) using an command line executable 5 52
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

832 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