Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Remote Processes and Machine control of Windows NT based systems (2000/XP)

, 1 Apr 2012 CPOL
Control certain aspects of machines sitting remotely, without having to install and trigger an application on the remote machine.

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

#include <afxcview.h>

const int MACHINE_IMAGE            = 1;

class CRemoteAdminDoc;
class CMachineInfo;
class CRemoteAdminView;

class CMachineView : public CTreeView

	virtual ~CMachineView();
	CRemoteAdminDoc* GetDocument();

    HTREEITEM ShowNewMachine(CString strTextToBeShown, CMachineInfo* pMachineInfo);
    void DeleteMachineFromTree(HTREEITEM hMachineToBeDeleted);
	void DeleteMachineFromBeingMonitored(CString strIP, CRemoteAdminView* pRemoteAdminView);
	BOOL AddMachine(CString strIP, CString strPassword, CRemoteAdminDoc* pRemoteAdminDoc, CRemoteAdminView* pRemoteAdminView);
    CString GetSelectedItemTextInTreeView();
    HTREEITEM GetTreeItemForText(CString strText);

    afx_msg void OnAddMachine();
    afx_msg void OnDeleteMachine();
    // ClassWizard generated virtual function overrides
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate(); // called first time after construct

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;

	CMachineView();  // create from serialization only

    afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRefreshProcess();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnExecuteProcess();
	afx_msg void OnShutdownHalt();
    afx_msg void OnShutdownReboot();
	afx_msg void OnShutdownAbort();

    CImageList m_ilMachine;
    HTREEITEM m_hMachineViewRoot;
    void CreateEmptyTree();
    void CreateImageList();
    void CreateTreeRoot();
    void RefreshProcesses(CString strRemoteMachineIP);

#ifndef _DEBUG  // debug version in MachineView.cpp
inline CRemoteAdminDoc* CMachineView::GetDocument()
   { return (CRemoteAdminDoc*)m_pDocument; }


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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Prateek Kaul
Web Developer
India India
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150302.1 | Last Updated 1 Apr 2012
Article Copyright 2003 by Prateek Kaul
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid