Modify Window Style for Document-View
MICHAEL@datatree.com Tuesday, May 28, 1996 Environment: VC++ 4.1 / Windows 95 / MDI Application Modifying the window style of the application window is NO problem. You simply change the style in the PreCreateWindow override in MAINFRM.CPP. But. how (or where) do I set the style for a form view window in a MDI application? Basically, I want to eliminate the minimize, maximize and close icons. ------------------------------ Michael L. Thal Data Tree Corporation voice: (619) 231-3300 fax: (619) 231-3301
Dale Wilson -- dale@dra.com Friday, May 31, 1996 [Mini-digest: 9 responses] On Tuesday, May 28, 1996 9:33AM Michael L. Thal asks: >> But. how (or where) do I set the style for a form view > window in a MDI application? > > Basically, I want to eliminate the minimize, > maximize and close icons. The windows adornments are in the frame window containing the view, not in the view itself. MFC generated a MDIChildFrame derived window for you. Add a PreCreateWindow handler to it. -----From: Severino Delaurenti Try to change the style in the CChildFrame::PreCreateWindow override in CHILDFRM.CPP. Best regards from Severino Delaurenti Olivetti Lexikon Spa Italy -----From: Erik FunkenbuschYou derive your own class from CMDIChildWnd and override PreCreateWindow in your derived class the same as you would for the mainframe. -----From: "James Ross" Derive from CMDIChildWnd and override PreCreateWindow in that class. Works mostly the same as in the main frame. Jim -----From: Jeff Wilkins All you need to do is override the PreCreateWindow of the frame for the MDI child window. Jeff Wilkins jwilkins@autonet.net -----From: "michael" Deriving an MDI child window class and overriding PreCreateWindow allowed me to modify the window style of my CFormView window. However, there was an important second step that was not mentioned in the MSDN article (Q98598). The derived class name had to be added to CMuultiDocTemplate() in my InitInstance() function. Thanks for the tip. ------------------------------ Michael L. Thal Data Tree Corporation voice: (619) 231-3300 fax: (619) 231-3301 -----From: "Frederic Steppe" It is exactly the same. You just have to change the style in the PreCreateWindow override of CHILDFRM.CPP Frederic Steppe (frederics@msn.com) -----From: Gordon Weakliem You'll need to create a MDI child based on CMDIChildFrame and change the styles in PreCreateWindow of the derived class. Note that in your AddDocumentTemplate() call, it uses CMDIChildFrame as the frame window, you'll need to substitute your derived class there as well. Gordon Weakliem gweakl@metronet.com -----From: "Peter A. Vanvliet" You must derive a class that wraps the MDIChild frame. Then add to it the PreCreateWindow(). The implementation of this function is the same as for a CMainFrame object. Peter --------------------------------------------------------------------- Peter A. Vanvliet Houston, Texas pvanvlie@neosoft.com System Analyst, NanoSoft Corporation (http://www.special-events.com) HALPC C++ SIG Leader WWW home page (http://www.special-events.com/cppsig)
| Вернуться в корень Архива |