
// AKAssms.h : main header file for the ODBConsole application
//
#pragma once

#ifndef __AFXWIN_H__
	#error "include 'stdafx.h' before including this file for PCH"
#endif

#include "resource.h"       // main symbols
#include "AKAssmsHub.h"
#include "P2PmsgMgr.h"

//
//  Windows message loop integration prototypes and definitions
//  for internal ODBConsole application use only
//  NOTES: Definition sequence is designed to trap use of the
//         message number elsewhere
const DWORD WM_APP_0x0101               = WM_APP + 0x0101;
const DWORD WM_APP_CONNECT_SQLSERVER    = WM_APP_0x0101;
const DWORD WM_APP_0x0102               = WM_APP + 0x0102;
const DWORD WM_APP_DISCONNECT_SQLSERVER = WM_APP_0x0102;
const DWORD WM_APP_0x0103               = WM_APP + 0x0103;
const DWORD WM_APP_TABLE_TOP_1000_ROWS   = WM_APP_0x0103;
const DWORD WM_APP_0x0104               = WM_APP + 0x0104;
const DWORD WM_APP_VIEW_TOP_1000_ROWS   = WM_APP_0x0104;

// CAKAssmsApp:
// See ODBConsole.cpp for the implementation of this class
//

class CAKAssmsApp : public CWinAppEx
{
public:
	CAKAssmsApp();

    // MFC Overrides
    public:
	     virtual
         BOOL InitInstance();
	     virtual int
         ExitInstance();

    // Property exposure
      CAKAssmsHub*
        GetAKAssmsHub ( );
      P2PmsgMgr*
        GetP2PmsgMgr ( );
      P2PmsgMgr*
        GetP2Pconfig ( );

    // Attributes
    public:
      CMultiDocTemplate *m_pDocTemplate;
      CMultiDocTemplate *m_pDocTemplateExecute;
      UINT               m_nAppLook;
      BOOL               m_bHiColorIcons;
      P2PmsgMgr         *m_pP2PmsgMgr;
      P2PmsgMgr         *m_pP2Pconfig;

	virtual void PreLoadState();
	virtual void LoadCustomState();
	virtual void SaveCustomState();

	afx_msg void OnAppAbout();
    // MFC Message map
	  DECLARE_MESSAGE_MAP()
      AFX_MSG_CALL void
        OnTableSelectTop1000Rows ( WPARAM wParam, LPARAM lParam );
      AFX_MSG_CALL void
        OnViewSelectTop1000Rows ( WPARAM wParam, LPARAM lParam );
};

extern CAKAssmsApp theApp;
