home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
PROGRAM
/
WTJ9403.ZIP
/
WILDASS
/
SOURCE
/
DESKTOP.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-13
|
2KB
|
78 lines
#ifndef _INC_DESKTOP_H
#define _INC_DESKTOP_H
class CDesktopWindow : public CObject
{
private:
HWND m_hWnd; // window handle
BOOL m_fIsIconic; // iconized flag
CString m_strModuleName; // module name of the task belonging to the window
HTASK m_hTask; // task handle of the task belonging to the window
CString m_strExePath; // exename of the file containing the module
CRect m_rectWnd; // window rect of this window
UINT m_swState; // showwindow state
//CString m_strArguments; // arguments when launched
public:
CDesktopWindow();
CDesktopWindow( const char * pszExePath, HTASK hTask );
void Create( const char * pszExePath, HTASK hTask );
HTASK HTask() const;
const char * ExePath() const;
UINT ShowState() const;
BOOL IsIconic() const;
const CRect& WindowRect() const;
void Move( BOOL fIconic, const CRect& rect );
void MoveIconic( const CRect& rect );
void WndInfo( HWND hWnd, BOOL fIsIconic, const CRect& rectWnd /*, const char * pszModuleName*/ );
void DumpProfile( const char * pszTag, UINT idEntry );
BOOL ReadProfile( const char * pszTag, UINT idEntry );
private:
// helper
// enum all windows
static BOOL CALLBACK __export EnumAllWindowsProc( HWND hWnd, LPARAM lParam );
};
class CDesktop : public CObList
{
private:
CString m_strName; // name of this desktop
static BOOL CALLBACK __export EnumWindowsProc( HWND hWnd, LPARAM lParam );
void Close();
public:
CDesktop( const char * pszName );
CDesktop();
~CDesktop();
void Create(); // creates the list
void PlayBack();
void Snapshot(); // calls create and dumps
private:
// Dump this desktop to the profile
void DumpProfile();
void ReadProfile();
// find an item by using its exename
POSITION Find( const char * pszExeName );
// avoid casts in usage
CDesktopWindow*& GetNext( POSITION& rPos );
CDesktopWindow* GetNext( POSITION& rPos ) const;
CDesktopWindow*& GetAt( POSITION pos );
CDesktopWindow* GetAt( POSITION pos ) const;
};
#endif // _INC_DESKTOP_H