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

Virtual Desktop: A Simple Desktop Management Tool

, 25 Jul 2008 CPOL
This article gives you an overview of Windows Station, Windows Desktop and how to work with them. It also has a sample application (Virtual Desktop) demonstrating multiple desktop management.
// Virtual DesktopDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "CommonDef.h"

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

// Dialog Data
	enum { IDD = IDD_VIRTUALDESKTOP_DIALOG };

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


// Implementation
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();

	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();

	DECLARE_MESSAGE_MAP()

public:
	LRESULT OnTrayMessage(WPARAM wParam, LPARAM lParam);

	afx_msg void OnBnClickedSwitchToDesktop();
	afx_msg void OnDestroy();
	afx_msg void OnLbnSelchangeDesktopList();
	afx_msg void OnBnClickedAddNewDesktop();

private:
	CListBox m_DesktopListControl;
	CEdit m_DesktopNameControl;

	CButton m_AddNewDesktop;
	CButton m_SwitchToDesktop;
	CButton m_ChkVerifyDesktopSwitch;

	void ShowManageDesktopsDialog(void);
	void SwitchDesktopTo(TCHAR * szDesktopName);

	bool RegisterApplicationHotKeys(void);
	bool UnRegisterApplicationHotKeys(void);
	bool UpdateHotKeys(void);

	afx_msg void OnBnClickedVerifyCheck();
	afx_msg void OnBnClickedLaunchApplication();

	LRESULT OnHotKey(WPARAM wParam, LPARAM lParam);
};

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Malli_S
Software Developer
India India
Hello All !
This is Mallinath S. Karkanti, from India. I'm working as a Software Developer in one of the Middle Scale Company... !

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141220.1 | Last Updated 25 Jul 2008
Article Copyright 2007 by Malli_S
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid