home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Troubleshooting Netware Systems
/
CSTRIAL0196.BIN
/
attach
/
msj
/
v10n10
/
vb40.exe
/
SHELLOCX.EXE
/
SHELLCTL.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-01
|
2KB
|
80 lines
// shellctl.h : Declaration of the CShellinkCtrl OLE control class.
/////////////////////////////////////////////////////////////////////////////
// CShellinkCtrl : See shellctl.cpp for implementation.
class CShellinkCtrl : public COleControl
{
DECLARE_DYNCREATE(CShellinkCtrl)
// Constructor
public:
CShellinkCtrl();
// Overrides
// Drawing function
virtual void OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
// Persistence
virtual void DoPropExchange(CPropExchange* pPX);
// Reset control state
virtual void OnResetState();
// Implementation
protected:
~CShellinkCtrl();
DECLARE_OLECREATE_EX(CShellinkCtrl) // Class factory and guid
DECLARE_OLETYPELIB(CShellinkCtrl) // GetTypeInfo
DECLARE_PROPPAGEIDS(CShellinkCtrl) // Property page IDs
DECLARE_OLECTLTYPE(CShellinkCtrl) // Type name and misc status
// Message maps
//{{AFX_MSG(CShellinkCtrl)
// NOTE - ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Dispatch maps
//{{AFX_DISPATCH(CShellinkCtrl)
afx_msg LPUNKNOWN GetShellLink();
afx_msg void SetShellLink(LPUNKNOWN newValue);
afx_msg BSTR CreateLink(LPCTSTR Path, LPCTSTR Description, BOOL OnDesk);
afx_msg BSTR ResolveLink(long hWnd, LPCTSTR Shortcut);
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
// Event maps
//{{AFX_EVENT(CShellinkCtrl)
//}}AFX_EVENT
DECLARE_EVENT_MAP()
// Internal stuff to track the IShellLink
IShellLink *m_link;
CString m_path;
CString m_shortcut;
CString m_description;
BOOL m_ondesk;
IShellLink *CreateShellLink();
void ReleaseShellLink();
void CreateShortcutName();
LPSTR Stupid(LPCSTR pszShortcutFile, LPSTR pszLink, LPSTR pszDesc);
// Dispatch and event IDs
public:
enum {
//{{AFX_DISP_ID(CShellinkCtrl)
dispidShellLink = 1L,
dispidCreateLink = 2L,
dispidResolveLink = 3L,
//}}AFX_DISP_ID
};
};