Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Base Class Members
Data Members
Indicates the HWND attached to this CWnd. |
Construction/Destruction
Constructs a CWnd object. |
|
Destroys the attached Windows window. |
Initialization
Attaches a Windows handle to a CWnd object. |
|
Called to calculate the window rectangle from the client rectangle. |
|
Creates and initializes the child window associated with the CWnd object. |
|
Create an ActiveX control that will be represented in an MFC program by a CWnd object. |
|
Creates a Windows overlapped, pop-up, or child window and attaches it to a CWnd object. |
|
Called automatically by the CWinApp idle-time handler and deletes any temporary CWnd objects created by FromHandle. |
|
Detaches a Windows handle from a CWnd object and returns the handle. |
|
Returns a pointer to a CWnd object when given a handle to a window. If a CWnd object is not attached to the handle, a temporary CWnd object is created and attached. |
|
Returns a pointer to a CWnd object when given a handle to a window. If a CWnd object is not attached to the handle, NULL is returned. |
|
Returns the window's extended style. |
|
Returns m_hWnd, or NULL if the this pointer is NULL. |
|
Returns the current window style. |
|
Called before the creation of the Windows window attached to this CWnd object. |
|
Allows other necessary subclassing to occur before SubclassWindow is called. |
|
Attaches a window to a CWnd object and makes it route messages through the CWnd's message map. |
|
Detaches a window from a CWnd object |
Window State Functions
Call this member function to make a frame window modal. |
|
Enables or disables mouse and keyboard input. |
|
Call this member function to change a frame window from modal to modeless. |
|
Retrieves the active window. |
|
Retrieves the CWnd that has the mouse capture. |
|
Retrieves the Windows desktop window. |
|
Retrieves the CWnd that currently has the input focus. |
|
Returns a pointer to the foreground window (the top-level window with which the user is currently working). |
|
Retrieves the handle to an icon. |
|
Retrieves the help context identifier. |
|
Specifies whether CWnd has touch support. |
|
Determines whether the window is enabled for mouse and keyboard input. |
|
Modifies the current window style. |
|
Modifies the window's extended style. |
|
Register/Unregister window Windows touch support. |
|
Activates the window. |
|
Causes all subsequent mouse input to be sent to the CWnd. |
|
Claims the input focus. |
|
Puts the thread that created the window into the foreground and activates the window. |
|
Sets the handle to a specific icon. |
|
Sets the help context identifier. |
Window Size and Position
Arranges all the minimized (iconic) child windows. |
|
Brings CWnd to the top of a stack of overlapping windows. |
|
Minimizes the window. |
|
Gets the dimensions of the CWnd client area. |
|
Retrieves the show state and the normal (restored), minimized, and maximized positions of a window. |
|
Gets the screen coordinates of CWnd. |
|
Retrieves a copy of the window region of a window. |
|
Determines whether CWnd is minimized (iconic). |
|
Determines whether CWnd is maximized. |
|
Changes the position and dimensions of CWnd. |
|
Sets the show state and the normal (restored), minimized, and maximized positions for a window. |
|
Changes the size, position, and ordering of child, pop-up, and top-level windows. |
|
Sets the region of a window. |
Window Access Functions
Centers a window relative to its parent. |
|
Determines which, if any, of the child windows contains the specified point. |
|
Returns the handle of the window, which is identified by its window name and window class. |
|
Returns the handle of the window, which is identified by its window name and window class. |
|
Retrieves the ancestor window object of the specified window. |
|
Searches all descendant windows and returns the window with the specified ID. |
|
If the CWnd is a child window, calling this function returns its ID value. |
|
Retrieves the control with the specified ID from the specified dialog box. |
|
Retrieves the opacity and transparency color key of a layered window. |
|
Determines which pop-up window owned by CWnd was most recently active. |
|
Returns the next (or previous) window in the window manager's list. |
|
Retrieves a pointer to the owner of a CWnd. |
|
Retrieves the parent window of CWnd (if any). |
|
Retrieves the CWnd object's parent frame window. |
|
Returns a pointer to a child window's parent window. |
|
Retrieves the safe owner for the given window. |
|
Retrieves the window's top-level frame window. |
|
Retrieves the top-level window. |
|
Retrieves the window's top-level parent. |
|
Returns the first child window that belongs to the CWnd. |
|
Returns the window with the specified relationship to this window. |
|
Returns information about the window. |
|
Returns the number of associated child windows. |
|
Returns the number of associated windowless child windows. |
|
Indicates whether CWnd is a child window or other direct descendant of the specified window. |
|
Sends a message to all descendant windows of the window. |
|
Sets the window or control ID for the window (which can be any child window, not only a control in a dialog box). |
|
Changes the owner of a CWnd. |
|
Changes the parent window. |
|
Initializes or retrieves data from a dialog box. |
|
Call to update the state of dialog buttons and other controls. |
|
Identifies the window that contains the given point. |
Update/Painting Functions
Animates the associated window object. |
|
Prepares CWnd for painting. |
|
Draws a wire-frame rectangle and animates it to indicate the opening of an icon or the minimizing or maximizing of a window. |
|
Draws a caption. |
|
Enables or disables one or both arrows of a scroll bar. |
|
Marks the end of painting. |
|
Retrieves a display context for the client area. |
|
Retrieves a display context for the client area, and enables clipping while drawing. |
|
Retrieves the coordinates of the smallest rectangle that completely encloses the CWnd update region. |
|
Retrieves the CWnd update region. |
|
Retrieves the display context for the whole window, including the caption bar, menus, and scroll bars. |
|
Invalidates the entire client area. |
|
Invalidates the client area within the given rectangle by adding that rectangle to the current update region. |
|
Invalidates the client area within the given region by adding that region to the current update region. |
|
Determines whether the window is visible. |
|
Disables or reenables drawing in the given window. |
|
Draws the current window in the specified device context. |
|
Copies a visual window into the specified device context, typically a printer DC. |
|
Draws any window in the specified device context (usually a printer device context). |
|
Updates the specified rectangle or region in the client area. |
|
Releases client and window device contexts, freeing them for use by other applications. |
|
Sets the opacity and transparency color key of a layered window. |
|
Allows changes in CWnd to be redrawn or prevents changes from being redrawn. |
|
Shows or hides all pop-up windows owned by the window. |
|
Shows or hides the window. |
|
Unlocks a window that was locked with CWnd::LockWindowUpdate. |
|
Updates the position, size, shape, content, and translucency of a layered window. |
|
Updates the client area. |
|
Validates the client area within the given rectangle by removing the rectangle from the current update region. |
|
Validates the client area within the given region by removing the region from the current update region. |
Coordinate Mapping Functions
Converts the client coordinates of a given point or rectangle on the display to screen coordinates. |
|
Converts (maps) a set of points from the coordinate space of the CWnd to the coordinate space of another window. |
|
Converts the screen coordinates of a given point or rectangle on the display to client coordinates. |
Window Text Functions
Retrieves the current font. |
|
Returns the window text or caption title (if it has one). |
|
Returns the length of the window's text or caption title. |
|
Sets the current font. |
|
Sets the window text or caption title (if it has one) to the specified text. |
Scrolling Functions
Enables or disables a sibling scroll-bar control. |
|
Returns a sibling scroll-bar control. |
|
Retrieves the information that the SCROLLINFO structure maintains about a scroll bar. |
|
Retrieves the limit of the scroll bar. |
|
Retrieves the current position of a scroll box. |
|
Copies the current minimum and maximum scroll-bar positions for the given scroll bar. |
|
Repositions control bars in the client area. |
|
Scrolls the contents of the client area. |
|
Scrolls the contents of the client area. Similar to ScrollWindow, with additional features. |
|
Sets information about the scroll bar. |
|
Sets the current position of a scroll box and, if specified, redraws the scroll bar to reflect the new position. |
|
Sets minimum and maximum position values for the given scroll bar. |
|
Displays or hides a scroll bar. |
Drag-Drop Functions
Indicates the window will accept dragged files. |
Caret Functions
Creates a new shape for the system caret and gets ownership of the caret. |
|
Creates a gray block for the system caret and gets ownership of the caret. |
|
Creates a solid block for the system caret and gets ownership of the caret. |
|
Retrieves the client coordinates of the caret's current position. |
|
Hides the caret by removing it from the display screen. |
|
Moves the caret to a specified position. |
|
Shows the caret on the display at the caret's current position. Once shown, the caret begins flashing automatically. |
Dialog-Box Item Functions
Places a check mark next to or removes a check mark from a button control. |
|
Checks the specified radio button and removes the check mark from all other radio buttons in the specified group of buttons. |
|
Continues a window's modal status. |
|
Fills a list box with a file or directory listing. |
|
Fills the list box of a combo box with a file or directory listing. |
|
Retrieves the current selection from a list box. |
|
Retrieves the current selection from the list box of a combo box. |
|
Ends a window's modal status. |
|
Initiates a dialog resource. |
|
Returns the ID of the currently checked radio button in a group of buttons. |
|
Retrieves information about the specified scroll bar. |
|
Retrieves information about the specified title bar. |
|
Retrieves information about the specified menu bar. |
|
Translates the text of a control in the given dialog box to an integer value. |
|
Retrieves the caption or text associated with a control. |
|
Searches for the next (or previous) control within a group of controls. |
|
Retrieves the first control with the WS_TABSTOP style that follows (or precedes) the specified control. |
|
Determines whether the given message is intended for the modeless dialog box and, if so, processes it. |
|
Determines whether a button control is checked. |
|
Retrieves, translates, or dispatches messages for a window that is in modal status. |
|
Sends a message to the specified control. |
|
Sets the text of a control to the string that represents an integer value. |
|
Sets the caption or text of a control in the specified dialog box. |
|
Attaches a Windows control to a CWnd object and makes it route messages through the CWnd's message map. |
Data-Binding Functions
Binds the calling object's default simple bound property, as marked in the type library, to a cursor associated with a data-source control. |
|
Binds a cursor-bound property on a data-bound control to a data-source control and registers that relationship with the MFC binding manager. |
|
Retrieves a pointer to the underlying cursor that is defined by the DataSource, UserName, Password, and SQL properties of a data-source control. |
Menu Functions
Redraws the menu bar. |
|
Retrieves a pointer to the specified menu. |
|
Allows the application to access the Control menu for copying and modification. |
|
Highlights or removes the highlighting from a top-level (menu-bar) menu item. |
|
Sets the menu to the specified menu. |
Tool Tip Functions
Disables the tooltip control. |
|
Enables the tooltip control. |
|
Enables the tooltip control in tracking mode. |
|
Retrieves the title or text associated with a control in a dialog box. |
|
Determines whether a point is in the bounding rectangle of the specified tool and retrieves information about the tool. |
Timer Functions
Kills a system timer. |
|
Installs a system timer that sends a WM_TIMER message when triggered. |
Alert Functions
Flashes the window once. |
|
Flashes the window with additional functionality. |
|
Creates and displays a window that contains an application-supplied message and caption. |
Window Message Functions
Calls the default window procedure, which provides default processing for any window messages that an application does not process. |
|
Returns a pointer to the message this window is currently processing. Should only be called when in an OnMessage message-handler member function. |
|
Places a message in the application queue, then returns without waiting for the window to process the message. |
|
Used by CWinApp to filter window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. |
|
Sends a message to the CWnd object and does not return until it has processed the message. |
|
Sends the specified message to the window and returns as soon as possible, depending on whether the calling thread created the window. |
Clipboard Functions
Removes CWnd from the chain of Clipboard viewers. |
|
Retrieves a pointer to the current owner of the Clipboard. |
|
Retrieves a pointer to the first window in the chain of Clipboard viewers. |
|
Retrieves a pointer to the window that currently has the Clipboard open. |
|
Opens the Clipboard. Other applications will not be able to modify the Clipboard until the Windows CloseClipboard function is called. |
|
Adds CWnd to the chain of windows that are notified whenever the contents of the Clipboard are changed. |
ActiveX Controls
Retrieves a pointer to an unknown ActiveX control. |
|
Retrieves the custom site for the specified ActiveX control. |
|
Retrieves an ActiveX control property. |
|
Invokes an ActiveX control method or property. |
|
Implement ambient property values. |
|
Sets an ActiveX control property. |
Overridables
Calls the default window procedure, which provides default processing for any window messages that an application does not process. |
|
For dialog data exchange and validation. Called by UpdateData. |
|
Called by a parent window to give a notifying control a chance to respond to a control notification. |
|
Called by the framework to inform a parent window an event has occurred in one of its controls or that the control needs information. |
|
This virtual function is called by the default OnNcDestroy function after the window has been destroyed. |
|
Provides a window procedure for a CWnd. The default dispatches messages through the message map. |
Help Command Handlers and Functions
Called to initiate the HTMLHelp application. |
|
Handles the ID_HELP_FINDER and ID_DEFAULT_HELP commands. |
|
Handles the ID_HELP_INDEX command and provides a default Help topic. |
|
Handles the ID_HELP_USING command. |
|
Handles F1 Help within the application (using the current context). |
|
Called to initiate the WinHelp application. |
Initialization Message Handlers
Called when a menu is about to become active. |
|
Called when a pop-up menu is about to become active. |
System Message Handlers
Called when the user interface (UI) state should be changed. |
|
Called to retrieve the user interface (UI) state for a window. |
|
Called to change the user interface (UI) state for the specified window and all its child windows. |
|
Called when Windows detects that system memory is low. |
|
Called for all top-level windows when the user changes device-mode settings. |
|
Called when the user releases the left mouse button over a window that has registered itself as the recipient of dropped files. |
|
Called when the pool of font resources changes. |
|
Called to allow windows that use a color palette to realize their logical palettes and update their client areas. |
|
Informs other applications when an application is going to realize its logical palette. |
|
Called from Print Manager whenever a job is added to or removed from the Print Manager queue. |
|
Called when a keystroke translates to a system character. |
|
Called for all top-level windows when a change is made in the system color setting. |
|
Called when the user selects a command from the Control menu, or when the user selects the Maximize or Minimize button. |
|
Called when a keystroke translates to a system dead character (such as accent characters). |
|
Called when the user holds down the ALT key and then presses another key. |
|
Called when the user releases a key that was pressed while the ALT key was held down. |
|
Called for all top-level windows after the system time changes. |
|
Called when the size, position, or Z-order has changed as a result of a call to SetWindowPos or another window-management function. |
|
Called when the size, position, or Z-order is about to change as a result of a call to SetWindowPos or another window-management function. |
|
Called for all top-level windows after the Windows initialization file, WIN.INI, is changed. |
General Message Handlers
Called when CWnd is being activated or deactivated. |
|
Called when the application is about to be activated or deactivated. |
|
Called to allow CWnd to cancel any internal modes, such as mouse capture. |
|
Called for multiple document interface (MDI) child windows whenever the size or position of CWnd changes or CWnd is activated. |
|
Called as a signal that CWnd should be closed. |
|
Called when the user selects a command. |
|
Called when the user clicks the right mouse button in the window. |
|
Copies data from one application to another. |
|
Called as a part of window creation. |
|
Called if CWnd is the parent of a control when the control is about to be drawn. |
|
Called when CWnd is being destroyed. |
|
Notifies an application or device driver of a change to the hardware configuration of a device or the computer. |
|
Called by the framework when it needs to obtain a bitmap to be displayed on Windows 7 tab thumbnail, or on the client for application peek. |
|
Called when CWnd is enabled or disabled. |
|
Called when the session is ending. |
|
Called to inform an application's main window procedure that a modal dialog box or a menu is entering an idle state. |
|
Called when the window background needs erasing. |
|
Called whenever Windows needs to know the maximized position or dimensions, or the minimum or maximum tracking size. |
|
Called when CWnd is minimized (iconic) and the background of the icon must be filled before painting the icon. |
|
Called immediately before CWnd loses the input focus. |
|
Called when the user presses a menu mnemonic character that doesn't match any of the predefined mnemonics in the current menu. |
|
Called when the user selects a menu item. |
|
Called after the position of the CWnd has been changed. |
|
Indicates that a user is moving a CWnd object. |
|
Called to repaint a portion of the window. |
|
Called when a child window is created or destroyed, or when the user clicks a mouse button while the cursor is over the child window. |
|
Called when a minimized (iconic) CWnd is about to be dragged by the user. |
|
Called when the user chooses to end the Windows session. |
|
Informs CWnd that it is about to receive the input focus. |
|
Called when CWnd is an icon and the user requests that the icon be opened. |
|
Called after CWnd gains the input focus. |
|
Called when CWnd is to be hidden or shown. |
|
Called after the size of CWnd has changed. |
|
Indicates that the user is resizing the rectangle. |
|
Indicates that the SetWindowLong Windows function has changed one or more of the window's styles. |
|
Indicates that one or more of the window's styles has changed. |
|
Indicates that the SetWindowLong Windows function is about to change one or more of the window's styles. |
|
Indicates that one or more of the window's styles is about to change. |
Control Message Handlers
Called by a child list box with the LBS_WANTKEYBOARDINPUT style in response to a WM_CHAR message. |
|
Called to determine the relative position of a new item in a child sorted owner-draw combo box or list box. |
|
Called when an owner-draw child list box or combo box is destroyed or when items are removed from the control. |
|
Called when a visual aspect of an owner-draw child button control, combo-box control, list-box control, or menu needs to be drawn. |
|
Called for a control so the control can process arrow-key and TAB-key input itself. |
|
Called for an owner-draw child combo box, list box, or menu item when the control is created. CWnd informs Windows of the dimensions of the control. |
|
Called by a list box owned by CWnd in response to a WM_KEYDOWN message. |
|
Indicates if a windows message was handled. |
|
Helper function which reflects a message to its source. |
|
Reflects the last message to the child window. |
|
Provides a notification message to a child window, from the parent window, so the child window can handle a task. |
Input Message Handlers
Sends a message to the window that is losing the mouse capture. |
|
Called when a keystroke translates to a nonsystem character. |
|
Called when a keystroke translates to a nonsystem dead character (such as accent characters). |
|
Called when the user clicks the horizontal scroll bar of CWnd. |
|
Called when a nonsystem key is pressed. |
|
Called when a nonsystem key is released. |
|
Called when the user double-clicks the left mouse button. |
|
Called when the user presses the left mouse button. |
|
Called when the user releases the left mouse button. |
|
Called when the user double-clicks the middle mouse button. |
|
Called when the user presses the middle mouse button. |
|
Called when the user releases the middle mouse button. |
|
Called when the cursor is in an inactive window and the user presses a mouse button. |
|
Called when the mouse cursor moves. |
|
Called when a user rotates the mouse wheel. Uses Windows NT 4.0 message handling. |
|
Called when the user double-clicks the right mouse button. |
|
Called when the user presses the right mouse button. |
|
Called when the user releases the right mouse button. |
|
Called when a user rotates the mouse wheel. Uses Windows 95/98 and Windows NT 3.51 message-handling. |
|
Process single input from Windows touch. |
|
Process inputs from Windows touch. |
|
Called if mouse input is not captured and the mouse causes cursor movement within a window. |
|
Called after each interval specified in SetTimer. |
|
Called when the user clicks the window's vertical scroll bar. |
Nonclient-Area Message Handlers
Called when the nonclient area needs to be changed to indicate an active or inactive state. |
|
Called when the size and position of the client area need to be calculated. |
|
Called prior to OnCreate when the nonclient area is being created. |
|
Called when the nonclient area is being destroyed. |
|
Called by Windows every time the mouse is moved if CWnd contains the cursor or has captured mouse input with SetCapture. |
|
Called when the user double-clicks the left mouse button while the cursor is within a nonclient area of CWnd. |
|
Called when the user presses the left mouse button while the cursor is within a nonclient area of CWnd. |
|
Called when the user releases the left mouse button while the cursor is within a nonclient area of CWnd. |
|
Called when the user double-clicks the middle mouse button while the cursor is within a nonclient area of CWnd. |
|
Called when the user presses the middle mouse button while the cursor is within a nonclient area of CWnd. |
|
Called when the user releases the middle mouse button while the cursor is within a nonclient area of CWnd. |
|
Called when the cursor is moved within a nonclient area of CWnd. |
|
Called when the nonclient area needs painting. |
|
Called when the user double-clicks the right mouse button while the cursor is within a nonclient area of CWnd. |
|
Called when the user presses the right mouse button while the cursor is within a nonclient area of CWnd. |
|
Called when the user releases the right mouse button while the cursor is within a nonclient area of CWnd. |
MDI Message Handlers
Called when an MDI child window is activated or deactivated. |
Clipboard Message Handlers
Called by a Clipboard viewer application when a Clipboard owner will display the Clipboard contents. |
|
Notifies that a specified window is being removed from the chain. |
|
Called when the Clipboard is emptied through a call to the Windows EmptyClipboard function. |
|
Called when the contents of the change. |
|
Called when a Clipboard owner should scroll the Clipboard image, invalidate the appropriate section, and update the scroll-bar values. |
|
Called when the client area of the Clipboard viewer needs repainting. |
|
Called when the owner application is being destroyed and needs to render all its formats. |
|
Called for the Clipboard owner when a particular format with delayed rendering needs to be rendered. |
|
Called when the size of the client area of the Clipboard-viewer window has changed. |
|
Called when the owner should scroll the Clipboard image, invalidate the appropriate section, and update the scroll-bar values. |
Menu Loop Notification
Called when a menu modal loop has been entered. |
|
Called when a menu modal loop has been exited. |
Operators
Determines if a window is not the same as the window whose handle is m_hWnd. |
|
Determines if a window is the same as the window whose handle is m_hWnd. |
|
Call to get a handle to a window. |
Active Accessibility Functions
Called by the framework to perform the object's default action. |
|
Called by the framework to retrieve the child element or child object at a given point on the screen. |
|
Called by the framework to retrieve the specified object's current screen location. |
|
Called by the framework to traverse to another user interface element within a container and if possible, retrieve the object. |
|
Called by the framework to modify the selection or move the keyboard focus of the specified object. |
|
Creates an Active Accessibility proxy for the specified object. |
|
Enables user-defined Active Accessibility functions. |
|
Called by the framework to retrieve the address of an IDispatch interface for the specified child. |
|
Called by the framework to retrieve the number of children belonging to this object. |
|
Called by the framework to retrieve a string that describes the object's default action. |
|
Called by framework to retrieve a string that describes the visual appearance of the specified object. |
|
Called by the framework to retrieve the object that has the keyboard focus. |
|
Called by the framework to retrieve an object's Help property string. |
|
Called by the framework to retrieve the full path of the WinHelp file associated with the specified object and the identifier of the appropriate topic within that file. |
|
Called by the framework to retrieve the specified object's shortcut key or access key. |
|
Called by the framework to retrieve the name of the specified object. |
|
Called by the framework to retrieve the IDispatch interface of the object's parent. |
|
Called by the framework to retrieve information that describes the role of the specified object. |
|
Called by the framework to retrieve the selected children of this object. |
|
Called by the framework to retrieve the current state of the specified object. |
|
Signals the system that a predefined event occurred. |
|
Called by the framework to retrieve the value of the specified object. |
|
Draws windowless controls on the control container. |