예제 #1
0
void CDataPool::AddWindowEventItem(const CString& szWindowName, const CString& szEventName, const CString& szFunction,BOOL isFromLayout /* =FALSE*/)
{
	//如果没有,那么添加
	AddWindowEvent(szWindowName);
	EventArray* pEA = GetWindowEvent(szWindowName);
	if (pEA)
	{
		//更新旧的
		EventArray::iterator it = pEA->begin();
		EventArray::iterator end = pEA->end();
		for (; it != end; it++)
		{
			if(it->eventName == szEventName)
			{
				it->funcName = szFunction;
				return;
			}
		}
		//添加新的
		Event_Define ed;
		ed.eventName = szEventName;
		ed.funcName = szFunction;
		ed.isReadFromLayout = isFromLayout;
		pEA->push_back(ed);
	}
}
예제 #2
0
	HANDLE createEvent(bool b = false) {
		HANDLE ev = ::CreateEvent(NULL, b ? TRUE : FALSE, FALSE, NULL);
		events.push_back(ev);
		return ev;
	}