Click here to Skip to main content
13,346,966 members (70,886 online)
Click here to Skip to main content
Articles » Multimedia » GDI » General » Downloads


93 bookmarked
Posted 11 Jan 2003

Barry's Screen Capture

, 11 Jan 2003
An article showing methods of screen capture
// MainFrm.h : interface of the CMainFrame class

#if !defined(AFX_MAINFRM_H__C7AB15CA_2F5E_4883_BCBF_445144F29E9E__INCLUDED_)
#define AFX_MAINFRM_H__C7AB15CA_2F5E_4883_BCBF_445144F29E9E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "mytrayicon.h"
#include "CapITDoc.h"

class CMainFrame : public CFrameWnd
//protected: // create from serialization only

	CCapITDoc* GetDocument();

// Attributes

	int m_iRedCode;
	int m_iGreenCode;
	int m_iBlueCode;
	int m_iPosX;
	int m_iPosY;

	BOOL m_bShowCodes;
	BOOL m_bShowPosition;
	BOOL g_mbImageCaptured;

// Operations

// Overrides
	// ClassWizard generated virtual function overrides
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

// Implementation
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;

protected:  // control bar embedded members
	CMyTrayIcon	m_trayIcon;		// my tray icon
	CEdit		m_wndEdit;		// to display tray notifications
	int			m_iWhichIcon;	// 0/1 which HICON to use
	BOOL		m_bShutdown;	// OK to terminate TRAYTEST
	BOOL		m_bShowTrayNotifications;	// display info in main window
	CStatusBar  m_wndStatusBar;
	CToolBar    m_wndToolBar;

	CButton*     m_Button;

// Generated message map functions
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg LRESULT OnTrayNotification(WPARAM wp, LPARAM lp);
	afx_msg void OnClose();

	afx_msg void OnAppOpen();
	afx_msg void OnAppSuspend();

	afx_msg void OnCaptureWindow();
	afx_msg void OnCaptureDesktop();
	afx_msg void OnCaptureControl();
	afx_msg void OnCaptureClient();
	afx_msg void OnClearCapture();

	afx_msg void OnUpdateClearCapture(CCmdUI* pCmdUI);
	afx_msg void OnUpdateCapture(CCmdUI* pCmdUI);
	afx_msg void OnShowCodes(CCmdUI* pCmdUI);



// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MAINFRM_H__C7AB15CA_2F5E_4883_BCBF_445144F29E9E__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Barretto VN
India India
Nothing to boast about

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180111.1 | Last Updated 12 Jan 2003
Article Copyright 2003 by Barretto VN
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid