Home

qmfcapp.h

This is the verbatim text of the qmfcapp.h include file. It is provided only for illustration; the copyright remains with Trolltech.


/****************************************************************************
** $Id: $
**
** Declaration of the QMfcApp classes
**
** Copyright (C) 2002-2003 Trolltech AS.  All rights reserved.
**
** This file is part of the MFC/Win32 migration framework.
**
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
** licenses for Windows may use this file in accordance with the Qt Commercial
** License Agreement provided with the Software.
**
** This file is not available for use under any other license without
** express written permission from the copyright holder.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
**   information about Qt Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/

#ifndef QMFCAPP_H
#define QMFCAPP_H

#include <qapplication.h>

class CWinApp;

#if defined(Q_WS_WIN)
#  if !defined(QT_QTWINMIGRATE_EXPORT) && !defined(QT_QTWINMIGRATE_IMPORT)
#    define QT_QTWINMIGRATE_EXPORT
#  elif defined(QT_QTWINMIGRATE_IMPORT)
#    if defined(QT_QTWINMIGRATE_EXPORT)
#      undef QT_QTWINMIGRATE_EXPORT
#    endif
#    define QT_QTWINMIGRATE_EXPORT __declspec(dllimport)
#  elif defined(QT_QTWINMIGRATE_EXPORT)
#    undef QT_QTWINMIGRATE_EXPORT
#    define QT_QTWINMIGRATE_EXPORT __declspec(dllexport)
#  endif
#else
#  define QT_QTWINMIGRATE_EXPORT
#endif

class QT_QTWINMIGRATE_EXPORT QMfcApp : public QApplication
{
public:
    static int run( CWinApp *mfcApp );
    static QApplication *instance( CWinApp *mfcApp );
    static bool pluginInstance( HANDLE plugin = 0 );

    QMfcApp( CWinApp *mfcApp, int &argc, char **argv );
    ~QMfcApp();

    bool winEventFilter( MSG *msg );

private:
    static char ** mfc_argv;
    static int mfc_argc;
    static CWinApp *mfc_app;

    bool idleCount;
    bool doIdle;
};

#endif // QMFCAPP_H

Copyright © 2003-2005 TrolltechTrademarks
Qt Solutions