| 297 | } |
| 298 | |
| 299 | bool CPaintManagerUI::LoadPlugin(LPCTSTR pstrModuleName) |
| 300 | { |
| 301 | ASSERT( !::IsBadStringPtr(pstrModuleName,-1) || pstrModuleName == NULL ); |
| 302 | if( pstrModuleName == NULL ) return false; |
| 303 | HMODULE hModule = ::LoadLibrary(pstrModuleName); |
| 304 | if( hModule != NULL ) { |
| 305 | LPCREATECONTROL lpCreateControl = (LPCREATECONTROL)::GetProcAddress(hModule, "CreateControl"); |
| 306 | if( lpCreateControl != NULL ) { |
| 307 | if( m_aPlugins.Find(lpCreateControl) >= 0 ) return true; |
| 308 | m_aPlugins.Add(lpCreateControl); |
| 309 | return true; |
| 310 | } |
| 311 | } |
| 312 | return false; |
| 313 | } |
| 314 | |
| 315 | CStdPtrArray* CPaintManagerUI::GetPlugins() |
| 316 | { |