home *** CD-ROM | disk | FTP | other *** search
/ Windoware / WINDOWARE_1_6.iso / source / owlbwcc / bwccdlg.cpp < prev    next >
C/C++ Source or Header  |  1992-02-02  |  3KB  |  50 lines

  1. /**********************************************************************/
  2. /*                  BWCCDLG.cpp by Bob Bourbonnais                    */
  3. /*              released to the public domain 1/12/92                 */
  4. /*                 This program shows the basics of                   */
  5. /*                  Borland Windows Custom Controls                   */
  6. /*               BWCC needs the bwcc.h to be included                 */
  7. /*                    in both the .CPP and .RC                        */
  8. /*                It also needs BWCCGetVersion();                     */
  9. /*                    to activate the library.                        */
  10. /*              The Project file must include BWCC.LIB                */
  11. /*        The .RC file must have BORDLG as the dialog class           */
  12. /*          and then the controls can be of special types             */
  13. /*                         such as BorShade.                          */
  14. /*    Remember to add #includes for windows.h and bwcc.h to the .RC   */
  15. /**********************************************************************/
  16. #include <owl.h>
  17. #include <dialog.h>
  18. #include "bwcc.h"                        // needed for BWCC
  19.  
  20. class TDialog1App : public TApplication  // Application Class to contain
  21.   {                                      // the application
  22.   public:
  23.     TDialog1App(LPSTR lpName, HANDLE hInstance,  // constructor calls the
  24.         HANDLE hPrevInstance,            // base class constructor
  25.         LPSTR lpCmdLine, int nCmdShow)
  26.         :TApplication(lpName, hInstance,
  27.                   hPrevInstance,
  28.                   lpCmdLine, nCmdShow) {};
  29.  
  30.     virtual void InitMainWindow(); // overrides base class InitMainWindow
  31.   };
  32.  
  33. void TDialog1App::InitMainWindow() // to initialize a dialog box
  34.   {                                // as the main window
  35.   BWCCGetVersion();                // Activate BWCC Library
  36.   MainWindow = new TDialog(NULL, "MAINWINDOWDIALOG");
  37.   }
  38.  
  39. int PASCAL WinMain(HANDLE hInstance,              // main entry point from
  40.            HANDLE hPrevInstance,          // windows to this program
  41.            LPSTR lpCmdLine , int nCmdShow)
  42.   {
  43.   TDialog1App Dialog1("Dialog Tester",hInstance,  // create instance of
  44.                hPrevInstance,             // the dialog application
  45.                lpCmdLine,nCmdShow);
  46.   Dialog1.Run();                                  // run it
  47.   return (Dialog1.Status);                        // exit
  48.   }
  49. /**********************************************************************/
  50.