
// SpeechControlDlg.h : header file
//

#pragma once

#include <atlbase.h>
#include <sphelper.h>
#include "OpenGLClass.h"

#pragma comment(lib, "..\\Debug\\SpeechLibrary.lib")

//Importowana z biblioteki klasa.
class __declspec(dllimport) SpeechCommanding
{
public:
	SpeechCommanding(int editBox);	
    bool initializeDialog(HWND dialogHandle);   
    int processRecognitionEvent();               

private:
    HWND                        dialogHandle;
    CComPtr<ISpRecoContext>     recognitionContext;
    CComPtr<ISpRecoGrammar>     recognitionGrammar;
	int							editBox;
};

// CSpeechControlDlg dialog
class CSpeechControlDlg : public CDialogEx
{
// Construction
public:
	CSpeechControlDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_SPEECHCONTROL_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

private:
	//Obiekt klasy odpowiedzialnej za OpenGL.
	OpenGLClass openGLWindow;

// Implementation
protected:
	HICON m_hIcon;

	//Obiekt klasy rozpoznajacej mowe.
	SpeechCommanding *speechCommanding;
	//Metoda wywolywana w przypadku rozpoznania.
	afx_msg LRESULT RecoEvent(WPARAM, LPARAM);

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();	
	afx_msg HCURSOR OnQueryDragIcon();

	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);

	DECLARE_MESSAGE_MAP()
};
