Click to open or copy the OLEVIEW project files.
The OLEVIEW sample illustrates how to implement ActiveX™ Object viewers through custom ActiveX interfaces. These custom interfaces are implemented in Iviewers.dll.
This sample includes two projects that you need to build: Iviewers.mak and Oleview.mak. To run OLEVIEW, make sure that Iviewers.dll is in the same directory as Oleview.exe or in a directory in your path.
The application has an SDI interface with two panes. The left pane allows you to browse the registry by means of a tree control. Once you select a node, the right pane will display the pertinent information.
If you select a type library in the tree control and double-click it, the type library viewer will be called.
This sample demonstrates the following keywords:
AfxGetInstanceHandle; AfxMessageBox; AfxOleInit; AfxThrowMemoryException; AfxThrowOleException; BitBlt; CBitmap::CreateBitmap; CBitmap::LoadBitmap; CBrush::CreateSolidBrush; CCmdTarget::BeginWaitCursor; CCmdTarget::EndWaitCursor; CDC::Attach; CDC::BitBlt; CDC::CreateCompatibleDC; CDC::DeleteDC; CDC::Detach; CDC::GetPixel; CDC::GetTextMetrics; CDC::SelectObject; CDialog::DoModal; CDialog::OnInitDialog; CDocument::OnCloseDocument; CDocument::OnNewDocument; CDocument::UpdateAllViews; CFileDialog::DoModal; CFileDialog::GetPathName; CFont::CreateFontIndirect; CFrameWnd::Create; CFrameWnd::GetActiveDocument; CFrameWnd::LoadFrame; CFrameWnd::OnCreateClient; CFrameWnd::SetActiveView; CGdiObject::DeleteObject; CListBox::SetCurSel; CObject::AssertValid; CObject::Dump; CRect::Height; CRect::Width; CScrollView::SetScrollSizes; CSplitterWnd::CreateStatic; CSplitterWnd::CreateView; CSplitterWnd::GetColumnInfo; CSplitterWnd::GetPane; CSplitterWnd::SetColumnInfo; CStatic::SetIcon; CString::Format; CString::GetBuffer; CString::IsEmpty; CString::LoadString; CString::ReleaseBuffer; CView::GetDocument; CView::OnDragEnter; CView::OnDragLeave; CView::OnDragOver; CView::OnDrop; CView::OnInitialUpdate; CView::OnUpdate; CWinApp::AddDocTemplate; CWinApp::Enable3dControls; CWinApp::ExitInstance; CWinApp::InitInstance; CWinApp::OnFileNew; CWinApp::SetRegistryKey; CWnd::DoDataExchange; CWnd::DragAcceptFiles; CWnd::GetParent; CWnd::GetSafeHwnd; CWnd::GetStyle; CWnd::GetWindowPlacement; CWnd::GetWindowRect; CWnd::OnCreate; CWnd::OnDestroy; CWnd::OnSize; CWnd::OnSysColorChange; CWnd::ScreenToClient; CWnd::SetFocus; CWnd::SetFont; CWnd::SetRedraw; CWnd::SetWindowPlacement; CWnd::SetWindowPos; CWnd::SetWindowText; CWnd::ShowWindow; ClientToScreen; CoCreateInstance; CoFreeUnusedLibraries; CoGetClassObject; CoGetMalloc; CreateSolidBrush; DeleteItem; DeleteObject; EnumFontFamilies; ExtTextOut; ExtractIcon; FormatMessage; FreeLibrary; FreeProcInstance; GetBkColor; GetClientRect; GetDC; GetDeviceCaps; GetNearestColor; GetObject; GetParent; GetProcAddress; GetProfileInt; GetProfileString; GetStockObject; GetSysColor; GetSystemMetrics; GetTextExtentPoint; GetTextMetrics; GetUserDefaultLCID; GetVersionEx; GetWindowLong; GetWindowRect; IClassFactory::CreateInstance; IMalloc::Free; IUnknown::QueryInterface; IUnknown::Release; IsWindow; LoadBitmap; LoadIcon; LoadLibrary; LoadLibraryEx; LocalFree; MAKEINTRESOURCE; MakeProcInstance; MulDiv; OffsetRect; Polygon; RGB; RectVisible; RegCloseKey; RegEnumKey; RegOpenKey; RegQueryValue; ReleaseDC; SelectObject; SetBkColor; SetTextColor; SetWindowPos; TabbedTextOut; WinExec; WinHelp; WriteProfileString; _fstrnicmp; atoi; isdigit; isspace; isxdigit; lstrcat; lstrcmpi; lstrcpy; lstrlen; max; strrchr; toupper; wsprintf