Demonstrate cross-platform compatibility in context of animated, internet-enabled Hello World






























Application lives between two systems - application framework above, OS below






























Application lives between two systems - application framework above, OS below






























Windows 95
class CDemoWindow : public CFrameWnd {
public:

    // ...
    
    // Keystrokes, commands, messages from outside
    
    //{{AFX_MSG( MIPlayWindow )
    afx_msg void    OnDestroy();
    afx_msg void    OnPaint();
    afx_msg LRESULT OnSpendTime(WPARAM wParam, LPARAM lParam);
    afx_msg void    OnLButtonDown(UINT nFlags, CPoint point);
    afx_msg void    OnShowWindow( BOOL bShow, UINT nStatus );
    //}}AFX_MSG

    DECLARE_MESSAGE_MAP()

    // ...
    
};































Mac OS
class CDemoWindow : public LWindow, public LPeriodical {
public:

    CDemoWindow( LCommander *inSuperCommander);

    // ...
    
    void    SpendTime(const EventRecord &inMacEvent);
    void    Click(SMouseDownEvent &inMouseDown);

protected:

    void    ActivateSelf();
    void    DeactivateSelf();

    // ...
    
};































Application lives between two systems - application framework above, OS below






























class stream {
public:
    
    stream( const char* path_of_file ); // open file
    ~stream();
    
    // go to offset in file
    void set_mark( long new_mark );

    // skip n bytes in file
    void skip( long n_bytes );

    // read n bytes from file into storage
    void get_bytes( void* storage, long n );
    
    // read a byte from the file
    uint8   get_uint8(); 
    
    // read a word from file in big endian format (and swap if necessary)    
    uint16  get_mac_uint16();
    uint32  get_mac_uint32();

    // ...
};































Application lives between two systems - application framework above, OS below






























Levels of source compatibility





























































Levels of source compatibility - Examples






























Levels of source compatibility - Examples






























Levels of source compatibility - Examples






























Levels of source compatibility - Examples