SAMPLE: MULTICON Demonstrates Dynamic IconsID: Q113251
|
The MULTICON sample demonstrates how to implement dynamic icons for both
CMDIChildWnd and CMDIFrameWnd windows. The procedure is to first register a
window class with a NULL icon for the frame. A frame of this type receives
WM_PAINT messages when it becomes iconic, and can output to a 36 x 36*
pixel area. To prevent duplicating output code from the view, the frame can
call its view's OnDraw member to do the output.
NOTE: Dynamically animated application icons will not work on Windows 95
and versions of Windows NT after 3.51.
The following file is available for download from the Microsoft Software Library:
MULTICON.EXEFor more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online ServicesThis file contains subdirectories, be sure to use the -d command line switch while extracting.
Feature (How to...) Location(s)
------------------- -----------
Generate random rectangles ................... RECTVIEW.CPP
CRectView::OnDraw
Generate random ellipses ..................... ELLPSEVW.CPP:
CEllipseView::OnDraw
Register a window class with a NULL
icon ......................................... MAINFRM.CPP:
CMainFrame::PreCreateWindow
Render on a minimized CMDIFrameWnd using the
application's active view .................... CMainFrame::OnPaint
Convert the display of a minimized
CMDIFrameWnd to an icon ...................... CMainFrame::QueryDragIcon
Enable OnIdle processing while a menu or
modal dialog is displayed .................... CMainFrame::OnEnterIdle
Render on a minimized CMDIChildWnd using the
associated view .............................. ICONWND.CPP:
CIconWnd::OnPaint
Convert the display of a minimized
CMDIChildWnd to an icon ...................... CIconWnd::QueryDragIcon
Drive animated views and icons in the
background ................................... MULTICON.CPP:
CMulticonApp::OnIdle
Additional query words: dynamic mdi frame child kbfile
Keywords : kbMFC KbUIDesign kbVC
Version : 1.00 1.50 1.51 1.52 | 1.00 2.00
Platform : NT WINDOWS
Issue type :
Last Reviewed: August 3, 1999