-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathItemScript.h
35 lines (32 loc) · 965 Bytes
/
ItemScript.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// ItemScript.h: interface for the CItemScript class.
#ifndef ITEMSCRIPT_H
#define ITEMSCRIPT_H
#include "treeiteminfo.h"
#include "scripting.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CItemScript : public CTreeItemInfo
{
public:
void FillMacros();
void OnSelect();
void InvokeMacros(DISPID dispID);
CItemScript(CScripting* pScript):CTreeItemInfo(pScript->m_ScriptName,ITREE_SCRIPTS_SCRIPT),m_pScript(pScript)
{
SHFILEINFO shfi;
if (SHGetFileInfo (pScript->m_FileName,0,&shfi,sizeof (SHFILEINFO),SHGFI_ICON|SHGFI_SMALLICON))
{
m_IconCollapsed=COCView::m_ImageList.Add(shfi.hIcon);
m_IconExpanded=m_IconCollapsed;
DestroyIcon(shfi.hIcon);
}
}
virtual ~CItemScript();
virtual HTREEITEM InsertInTree(HTREEITEM pParent);
virtual void GetContextMenu(CString& list);
virtual void OnContextMenu(LPCTSTR name,int pos);
virtual void OnAction();
CScripting* m_pScript;
};
#endif