GENERIC

The GENERIC application demonstrates some of the basic functionality of Windows CE. This application creates the main application window and draws a horizontal and vertical line. Each line bisects the client area, creating four equal quadrants. The application captures the message WM_LBUTTONDOWN, and processes it on the basis of the processing depends on the quadrant in which the user tapped the stylus.

Top Left quadrant: Exits the application
Top Right quadrant: Toggles the mouse capture on/off
Bottom Left quadrant: Changes the Z-order of the window
Bottom Right quadrant: Draws a square with the lower left corner at the point of the stylus tap.

The drawing is done in the OnPaint handler, using the Polyline function.

This sample demonstrates the following keywords:

CDC::Polyline

CFrameWnd::LoadFrame

CWnd::GetClientRect

CWnd::InvalidateRect

CWnd::OnLButtonDown

CWnd::SetCapture

CWnd::SetWindowPos

CWnd::ShowWindow

CWnd::UpdateWindow

PostQuitMessage

ReleaseCapture

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

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