void LoadModules(dcmapFCSTR szDir) { VecFiles vecFiles; sysstring loc = sysstring(szDir)+L"*"; ListDirectory(loc.c_str(),vecFiles); for(int i=0;i<vecFiles.size();i++) { sysstring& Filename = vecFiles[i]; if(Filename.empty())continue; if(Filename[0]=='.')continue; sysstring Path = szDir+Filename; if(IsDirectory(Path.c_str())) // load module from directory { sysstring ModuleDir = Path+L"\\"; sysstring ModuleName; #ifdef _DEBUG ModuleName = ModuleDir+Filename+L".ddll"; if(!gsys::FileExists(ModuleName)) #endif // _DEBUG { ModuleName = ModuleDir+Filename+L".dll"; if(!gsys::FileExists(ModuleName))continue; // no module file } LoadPluginModule(ModuleName.c_str(),ModuleDir.c_str(),Filename.c_str(),true); } } SetCurrentDirectory(GetAppStartupDir().c_str()); }
void LoadPlugins(dcmapFCSTR szDir) { VecFiles vecFiles; sysstring loc = sysstring(szDir)+L"*.dll"; ListDirectory(loc.c_str(),vecFiles); for(int i=0;i<vecFiles.size();i++) { sysstring str = szDir+vecFiles[i]; LoadPluginModule(str.c_str(),szDir,gsys::StripEXT(vecFiles[i]).c_str(),false); } }
// Called when one of the children have changed size void CGridContainerNode::RecalculateParentSize(MSWindows::HDC hDC) { ASSERT(0); #if 0 m_size.cx = 0; int maxx = GetChildrenWidth(); ResizeChildren(hDC, maxx); CalculateChildrenSize(); int y = 0; UPOSITION pos = m_childList.GetHeadPosition(); while (pos) { CGridItem* pChild = (CGridItem*)m_childList.GetNext(pos); pChild->m_pos.y = y; y += pChild->m_size.cy; } if (m_parent) { CComBSTR tagName; m_domNode->get_nodeName(&tagName); SelectObject(hDC, m_pUI->m_hFont[Font_ElementName]); CRect rc(0,0,0,0); DrawText(hDC, sysstring(tagName), tagName.Length(), &rc, DT_CALCRECT | DT_SINGLELINE); m_nameHeight = rc.Height(); m_size.cx += m_childrenIndent;//20; m_size.cy += m_nameHeight; { UPOSITION pos = m_childList.GetHeadPosition(); while (pos) { CGridItem* pChild = (CGridItem*)m_childList.GetNext(pos); pChild->m_pos.x = m_childrenIndent;//20; pChild->m_pos.y += m_nameHeight; } } m_parent->RecalculateParentSize(hDC); } #endif }
void CharacterData::insertData(long offset, System::StringW* arg) { ASSERT(0); #if 0 // TODO, improve this sysstring data = sysstring(m_data.c_str(), offset); data += arg; data += m_data.c_str()+offset; m_data = data; MutationEvent* evt = new MutationEvent; evt->m_offset = offset; evt->m_len = arg.length(); evt->initEvent(OLESTR("TextInserted"), true, false); dispatchEvent(evt); #endif }
void CharacterData::deleteData(long offset, long count) { // TODO, improve this ASSERT(0); #if 0 System::StringW* data = sysstring(m_data.c_str(), offset); data += m_data.c_str()+offset+count; m_data = data; MutationEvent* evt = new MutationEvent; evt->m_offset = offset; evt->m_len = count; evt->initEvent(WSTR("TextDeleted"), true, false); dispatchEvent(evt); #endif }