home *** CD-ROM | disk | FTP | other *** search
- // Microworks ObjectMate 2.6
- //
- // SFXMDI - Basic SFX MDI Frame Window
- //
- // Copyright 1992-94 Microworks Sydney, Australia.
- //
- // SFXMDI.CPP
-
- /* SFXMDI sets up a basic SFX MDI frame window. There are only two
- * window styles that can be used with SFX MDI frame windows: MWS_3DFRAME or
- * MWS_SFXFRAME. SFXMDI uses the MWS_SFXFRAME style.
- */
-
- #include <owl\owlpch.h>
- #include <sfx\sfx200.h>
- #include <sfx\smdi.h>
- #include <sfx\smchild.h>
- #include <sfx\swindow.h>
-
- class TClient : public TSFXMDIClient {
- public:
- TClient() : TSFXMDIClient(TRUE) {}
- //TClient() : TSFXMDIClient() {}
- TSFXMDIChild* InitChild();
- DECLARE_RESPONSE_TABLE (TClient);
- };
-
- DEFINE_RESPONSE_TABLE3(TClient, TSFXMDIClient, TMDIClient, TWindow)
- END_RESPONSE_TABLE;
-
- TSFXMDIChild*
- TClient::InitChild()
- {
- char childName[] = "MDI Child Window";
-
- /* The first TRUE sets the MWS_SFXFRAME flag and the second TRUE sets the
- * MWS_SFXCAPTION flag.
- */
- return new TSFXMDIChild(*this, childName, new TWindow(0, 0, 0), TRUE, TRUE);
-
- /* FALSE sets the MWS_3DFRAME flag and TRUE sets the MWS_SFXCAPTION flag.
- */
- //return new TSFXMDIChild(*this, childName, new TWindow(0, 0, 0), FALSE, TRUE);
- }
-
- //----------------------------------------------------------------------------
-
- class TSFXMDIApp : public TApplication {
- public:
- TSFXMDIApp() : TApplication("SFX MDI Window") {}
- void InitMainWindow();
- };
-
- void
- TSFXMDIApp::InitMainWindow()
- {
- /* The first TRUE sets the MWS_SFXFRAME flag and the second TRUE sets the
- * MWS_SFXCAPTION flag.
- */
- MainWindow = new TSFXMDIFrame(GetName(), "MDIMENU", *new TClient(), TRUE, TRUE);
-
- /* FALSE sets the MWS_3DFRAME flag and TRUE sets the MWS_SFXCAPTION flag.
- */
- //MainWindow = new TSFXMDIFrame(GetName(), "MDIMENU", *new TClient(), FALSE, TRUE);
- }
-
- int
- OwlMain(int /*argc*/, char* /*argv*/ [])
- {
- return TSFXMDIApp().Run();
- }
-