PALETTE

The PALETTE sample demonstrates how to use the CPalette class to paint bitmaps. You can choose to view the included bitmap painted with or without a palette. Bitmaps painted without a palette are noticeably inferior to those painted with a palette.

To turn the palette on or off, select File, then click on the Use Picture Palette menu item.

Note If you run the sample on a Windows desktop platform (using emulation), you should set your color palette settings to 256 colors. You will not notice the difference in bitmap quality if your machine is using a palette with more than 256 colors.

This sample demonstrates the following keywords:

CArchive::m_pDocument CPalette::CreatePalette
CArchive::Read CScrollView::SetScrollSizes
CCmdTarget::BeginWaitCursor CSize::CSize
CCmdTarget::EndWaitCursor CView::GetDocument
CDC::m_hDC CWnd::CenterWindow
CDC::RealizePalette CWnd::GetMenu
CDialog::DoModal CWnd::Invalidate
CDialog::OnInitDialog CWnd::m_hWnd
CDocument::DeleteContents CWnd::SendMessage
CDocument::GetFirstViewPosition CWnd::ShowWindow
CDocument::GetNextView CWnd::UpdateWindow
CDocument::SetModifiedFlag CreateCompatibleDC
CDocument::SetPathName CreateDIBSection
CDocument::UpdateAllViews DeleteDC
CFile::Open DeleteObject
CFile::ReadHuge FindResource
CFrameWnd::AddAdornments LoadResource
CFrameWnd::Create MessageBox
CFrameWnd::GetActiveView SelectPalette
CGdiObject::m_hObject SelectPalette
CMenu::CheckMenuItem SizeofResource
CObject::IsKindOf  

You can find the PALETTE project files in the Wce\Samples\Mfc\PALETTE directory.

For information on the Windows CE platforms that support this sample, see MFC for Windows CE Samples.