CWnd

The CWnd class provides the base functionality of all window classes in MFC for Windows CE.

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

Remarks

Windows CE defines a new window style, called WS_EX_NODRAG. This style creates a stationary window. Specify this style when you want to prevent a user from dragging a window by its title bar.

MFC for Windows CE supports a new data member for the CWnd class. The m_hCommandBarMenu member is the menu handle to a window's command bar menu.

MFC for Windows CE supports the following member functions of the CWnd class differently than the standard MFC library does.

CWnd::Create

CWnd::CreateEx

CWnd::DestroyWindow

CWnd::MessageBox

CWnd::ShowWindow

GetCurrentMessage

CWnd::GetUpdateRgn

CWnd::GetWindow

CWnd::InvalidateRect

CWnd::MoveWindow

CWnd::OnInitMenuPopup

CWnd::OnMenuChar

CWnd::OnSize

CWnd::OnWinIniChange

CWnd::ScrollWindowEx

CWnd::SetForegroundWindow

CWnd::SetWindowPos

CWnd::ValidateRect

MFC for Windows CE does not support the following member functions of the CWnd class.

ArrangeIconicWindows OnMouseActivate
CancelToolTips OnMouseWheel
ChangeClipboardChain OnMoving
CreateCaret OnNcActivate
CreateGrayCaret OnNcCalcSize
DlgDirList OnNcCreate
DlgDirListComboBox OnNcHitTest
DlgDirSelect OnNcLButtonDblClk
DlgDirSelectComboBox OnNcLButtonDown
DragAcceptFiles OnNcLButtonUp
DrawMenuBar OnNcMButtonDblClk
EnableScrollBar OnNcMButtonDown
EnableToolTips OnNcMButtonUp
FilterToolTipMessage OnNcMouseMove
FlashWindow OnNcPaint
GetClipboardViewer OnNcRButtonDblClk
GetDCEx OnNcRButtonDown
GetDSCCursor OnNcRButtonUp
GetLastActivePopup OnPaintClipboard
GetSystemMenu OnPaletteChanged
GetWindowContextHelpId OnPaletteIsChanging
GetWindowPlacement OnParentNotify
GetWindowRgn OnQueryDragIcon
HiliteMenuItem OnQueryEndSession
InvalidateRgn OnQueryNewPalette
IsZoomed OnQueryOpen
LockWindowUpdate OnRButtonDblClk
OnActivateApp OnRButtonDown
OnAskCbFormatName OnRButtonUp
OnChangeCbChain OnRegisteredMouseWheel
OnChildActivate OnSetCursor
OnCompacting OnSizeClipboard
OnContextMenu OnSizing
OnDeviceChange OnSpoolerStatus
OnDevModeChange OnStyleChanging
OnDrawClipboard OnSysColorChange
OnDropFiles OnTimeChange
OnDSCNotify OnToolHitTest
OnEndSession OnVScrollClipboard
OnEnterIdle OnWindowPosChanging
OnEnterMenuLoop Print
OnExitMenuLoop PrintClient
OnGetMinMaxInfo SetClipboardViewer
OnHScrollClipboard SetMenu
OnIconEraseBkgnd SetWindowContextHelpId
OnInitMenu SetWindowPlacement
OnMButtonDblClk SetWindowRgn
OnMButtonDown ShowOwnedPopups
OnMButtonUp ShowScrollBar
OnMDIActivate UnockWindowUpdate
OnMenuSelect ValidateRgn

For more information on window management in Windows CE, see Window Management.

See Also

CWnd Member Functions, CWnd Data Members, Window Class Categories, CWnd::m_hCommandBarMenu, CFrameWnd, CView