Projects > KM-RW Project > KM-RWDlg-Decl.h

Home | Projects | Links

 

KM-RW PROJECT

  

KM-RWDlg-Decl.h    KM-RWDlg-Impl_and_Play-Rec_Proc.h    KM-RWSettings.h    StoreStruct.h    cwfi.h

Download km-rw.exe (392 KB)        Download VC++ 8.0 Project (26.8 KB RAR Archive)        KM-RW Help


// CKMRWDlg dialog: (the visible dialog of the app)
class CKMRWDlg : public CDialog
{
	//Enumeration for app's status:
	enum __STATUS {STOPPED=0, REC_PAUSED_USER,
                                       REC_PAUSED_SYSTEM, PLAY_PAUSED_USER, PLAY_PAUSED_SYSTEM, RECORDING, PLAYING};
	
	enum { IDD = IDD_KMRW_DIALOG };

public:
	CKMRWDlg(CWnd* pParent = NULL);	// standard constructor

protected:
	//This class contains means to make windows transparent:
	CLayeredWindowHelperST lw;

	//Icon and Dialog controls:
	HICON m_hIcon;

	CButton * recordBtn;
	CButton * playBtn;
	CButton * stopBtn;
	CListBox * outBox;

	char outstring[200];
	ostrstream outstream;

public:
	//Application settings:
	KMRWSettings settgs;

protected:
	//These members are for actual recording and playback:
	__STATUS status;
	bool autoplay_in_progress;
	
	POSITION readPOS;
	EVENTMSG currMSG;
	bool FeedNextMsg;
	StoreStruct * tempss;
	unsigned long PrevMessageTime;
	
	CList<StoreStruct,StoreStruct&> Journal;
	
	int PlayEventCount;
	int PlayCycleCount;

private:
	void DoRecord();
	void ContinueRecording();
	void PauseRecord(bool paused_by_user);
	void StopRecord();

	void DoPlay();

	afx_msg LRESULT AutoPlay(WPARAM wParam, LPARAM lParam);
	void StartPlayingSession();

	afx_msg LRESULT Play1Time(WPARAM wParam, LPARAM lParam);
	void ContinuePlaying();
	void PausePlay(bool paused_by_user);
	void StopPlay1Time();
	void StopPlay();

	void DoStop();

public:

	//--- These two are defined in "Pl_Rec_Procs.h " ----------------------
	void ProcessRecordHook(int code,WPARAM wparam,LPARAM lparam);
	LRESULT CALLBACK ProcessPlayHook(int code,WPARAM wparam,LPARAM lparam);
	//---------------------------------------------------------------------

	void InterruptionHandler(bool paused_by_user);

private:
	// Generated message map functions + standard Dialog stuff:
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();

public:
	void WriteToBox(CString strg);

private:
	void DoPSDialog();

	void UpdateUI();

	bool SaveList();
	bool ReadList();

	void DoHelpDlg();

	
	DECLARE_MESSAGE_MAP()
};

 


KM-RWDlg-Decl.h    KM-RWDlg-Impl_and_Play-Rec_Proc.h    KM-RWSettings.h    StoreStruct.h    cwfi.h

 Download km-rw.exe (392 KB)         Download VC++ 8.0 Project (26.8 KB RAR Archive)        KM-RW Help

 

Get WinRAR

 

 

Copyright © Yuri Bulankov 2004

 

Bugs/Comments: code@compilerabuse.com

Copyright (C) 2001-2006 Yuri Bulankov. All rights reserved.