Course list http://www.c-jump.com/bcc/

Lab 3: FLUID Window Class


  1. Description
  2. Copying Visual Studio Project
  3. Using FLUID to create a C++ class
  4. Getting Started with FLUID Project
  5. Adding CFluidWindow class
  6. Adding the class constructor
  7. Adding the window
  8. Testing what we have so far
  9. Adding FLUID-generated .CXX to Visual Studio Project
  10. How to submit

Description



Copying Visual Studio Project



Using FLUID to create a C++ class



Getting Started with FLUID Project



Adding CFluidWindow class



Adding the class constructor



Adding the window



Testing what we have so far



Adding FLUID-generated .CXX to Visual Studio Project


  1. Open Visual Studio project and add file fluid_project/CFluidWindow.cxx to the list of source files.

  2. Create CDemoWindow.h under project source directory

    
        c255labs\labs\c255_lab03_win_class\src
    
    
  3. Copy and paste the following code into the file:

    
    // CDemoWindow.h
    
    #ifndef _CDEMOWINDOW_H_INCLUDED_
    #define _CDEMOWINDOW_H_INCLUDED_
    
    #include "../fluid_project/CFluidWindow.h"
    
    class CDemoWindow : public CFluidWindow {
    public:
        void show()
        {
            // Make the window visible:
            win_app->show();
        }
    };//class CDemoWindow
    
    #endif // _CDEMOWINDOW_H_INCLUDED_
    
    
  4. Modify c255_lab03_main.cpp as follows:

    
    // main.cpp
    
    #include "CDemoWindow.h"
    
    int main()
    {
        CDemoWindow window;
        window.show();
        return Fl::run();
    }
    
    
  5. Compile and test the program.

     


How to submit