Listing 2: The tmdi_frame_window class header


typedef struct tmdi_type_list_tag {
   UINT type_id;
   LPCSTR the_class;
   LPCSTR the_title;
   tmdi_type_list_tag *next;
   } tmdi_type_list_struct;

LRESULT CALLBACK _export  FrameWndProc (HWND hwnd,
     UINT message,WPARAM wParam,LPARAM lParam);

#define NO_ABOUT   0
#define SHOW_ABOUT 1

class tmdi_frame_window: public twindow {
   public:
   tmdi_frame_window (HINSTANCE hInstance,
       LRESULT CALLBACK window_proc,int window_extra,
       LPCSTR menu_name,LPCSTR title_name,
       LPCSTR class_name,LPCSTR icon_name,
       tmdi_type_list_struct *child_types,
       int init_show_about);
   HWND hwndClient;
   CLIENTCREATESTRUCT clientcreate ;
   HWND               hwndChild ;
   MDICREATESTRUCT    mdicreate ;
   tmdi_type_list_struct *mdi_children_types;
   HMENU frame_menu,frame_submenu;
   int show_about; 
   virtual void set_global_ptr (void);
   virtual void set_mdicreate (LPCSTR the_class,
          LPCSTR the_title);
   virtual int respond_wm_create (HWND hwnd);
   virtual int respond_wm_command (WPARAM wParam,
       LPARAM lParam);
   virtual int respond_wm_queryendsession (void);
   virtual int respond_wm_close (void);
   virtual int respond_wm_destroy (HWND hwnd);
   virtual int respond_wm_about (void);
   virtual LRESULT CALLBACK default_window_proc
       (HWND hwnd,UINT message,WPARAM wParam,
       LPARAM lParam);
   void init_menu (HINSTANCE hinst,
       LPCSTR menu_rc_name,WPARAM window_submenu_pos);
   };
// End of File