Microsoft Foundation Classes (mfc.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
class CStatic
◄CWnd► ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
Description
The CStatic class provides the functionality of a Windows static
control. A static control is a simple text field, box, or rectangle that
can be used to label, box, or separate other controls. A static control
takes no input and provides no output.
You create a static control in two steps. First, call the constructor
CStatic to construct the CStatic object, then call the ◄Create► member
function to create the static control and attach it to the CStatic
object.
If you create a CStatic object within a dialog box (through a dialog
resource), the CStatic object is automatically destructed when the user
closes the dialog box.
If you create a CStatic object within a window, you may also need to
destroy it. A CStatic object created on the stack within a window is
automatically destroyed. If you create the CStatic object on the heap by
using the new function, you must call delete on the object to destroy it
when the user terminates the Windows static control.
See Also
◄CWnd►, ◄CButton►, ◄CComboBox►, ◄CEdit►, ◄CListBox►, ◄CScrollBar►,
◄CModalDialog►, ◄CDialog►
Public Members
Construction/Destruction
◄CStatic► Constructs a CStatic object.
Initialization
◄Create► Creates the Windows static control and attaches it to the
CStatic object.
Windows 3.1 Functions
◄SetIcon► Associates an icon with an icon resource.
◄GetIcon► Retrieves the handle of the icon associated with an icon
resource.
-♦-