SECPopupColorWell Class
class SECPopupColorWell: public SECColorWell
The SECPopupColorWell class implements a popup color well window (See SECColorWell). This class is defined primarily for use with the SECWellButton class. It is popped up when the well button is clicked to allow the user to select a color. When a color is selected a CWN_COLOR_CHANGE message is sent to the SECWellButton, and the popup window is destroyed (not the SECPopupColorWell object). Similarly, if the popup window loses focus, it is also destroyed.If the 'Other' button (displayed on the face of the popup color well window) is clicked, the popup window is destroyed and a CWN_CUSTOM_COLOR message is sent to the button.
DDX_Color can be used for DDX support with the color well classes.
See the COLOR sample in the \\OT\\SAMPLES\\STANDARD\\CONTROLS\\COLRWELL directory for a demonstration of this class.
Defined in: SECWELL.h
Class Members
Creation/Initialization
Constructs a popup color well object.
virtual BOOL Create(DWORD dwStyle, CRect& buttonRect, CWnd* pParentWnd, BOOL bHasOther = TRUE, CCreateContext* pContext = NULL)
Creates a popup color well window.
Attributes
BOOL IsCreated() const
Returns whether the popup color well window is currently created.
void SetNotifyWindow(CWnd* pWnd)
Sets the window to notify of color changes.
virtual void Reset()
Resets the popup color well object.
Overrides
virtual void HandleSelection( int x, int y, SelTypes selType )
Called when the user selects a new color.
virtual void NotifyChange()
Notifies the parent window of a change in color.
virtual void PostNcDestroy()
Called by the default OnNcDestroy member function after the
virtual UINT GetClassStyle() const
Returns the class style used to register the color well window class.
virtual BOOL HasFocusRectangle() const
Returns whether the color well has a focus rectangle.
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
Called when a nonsystem key is pressed.
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
Called when a nonsystem key is released.
virtual void ClickedOther()
Called from OnLButtonDown() when the "other" button is clicked (to create CColorDialog).
afx_msg void OnLButtonDown(UINT nFlags, CPoint point)
Called when the user presses the left mouse button.
afx_msg UINT OnGetDlgCode()
Override to control the particular types of input to process.
afx_msg void OnKillFocus(CWnd* pNewWnd)
Called immediately before losing the input focus.
HWND m_notifyHwnd
Window to notify of color changes.
CWnd* m_pNotifyWnd
Window to return focus to on destroying popup.
BOOL m_bCreated
True when the popup has been created