home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
deans.zip
/
WINDOW.HPP
< prev
Wrap
Text File
|
1994-09-14
|
37KB
|
977 lines
//
// NAME: CIDGui_Window.Hpp
//
// DESCRIPTION:
//
// This is the header for the CIDGui_Window.Cpp module. This module provides
// the base window class from which all other window classes are derived. It
// provides a number of standard methods that operate on all window types
// the same, and some pure virtual ones that must be overridden in derived
// classes.
//
// The base WINDOW class is pretty simple. Though it supports a good number
// of methods, these methods generally just turn around and call PM and
// system methods.
//
// The class hierarchy here is:
//
// CIDOBJECT
// │
// WINDOW
//
//
// AUTHOR: Dean Roddey
//
// CREATE DATE: 04/11/93
//
// COPYRIGHT: 1992, 1993, 'CIDCorp
//
// CAVEATS/GOTCHAS:
//
// 1) Out of necessity, the window handle of the window is publically
// available, but they should seldom be needed and should not be
// abused!!
//
// 2) Control messages are actually reflected back to the window from
// which they came (via the protected, virtual method _bControl().) The
// control is free to process these messages and send them on to the
// owner via the public versions. They have to convert any OS/2
// structures to objects as required by the particular message.
//
// This will change soon I think so that the protected versions of
// _bControl() and _bCommand() will not be visible outside of this
// facility. They will handle filtering of PM control wrapper classes
// and then calling a public version that is for general use (and
// will be sure never to even accidentally see PM specific stuff.)
//
// MODIFICATION LOG:
//
// Avoid multiple inclusions
#if !defined(CIDGUI_WINDOW_HPP)
#define CIDGUI_WINDOW_HPP
// -----------------------------------------------------------------------------
// Some typedefs to build some pseudo class names based on existing classes.
// These are to make the code more self documenting without the overhead of
// deriving new classes that add no functionality.
// -----------------------------------------------------------------------------
typedef C4UNION MPARM;
// -----------------------------------------------------------------------------
// CLASS: WINDOW
// PREFIX: wnd
//
// This is the primal window class. It is the basis for all window classes and
// provides a lot of the standard funtionality of windows.
// -----------------------------------------------------------------------------
class WINDOW : public CIDOBJECT
{
public :
// ---------------------------------------------------------------------
// Constructors and Destructors.
//
// WINDOW
// The default constructor is protected. These two are for
// creating a new window object or creating a window object
// from an existing PM window.
//
// ~WINDOW
// The destructor will destroy the window. Since this is the
// last level of the window classes, it knows that nobody else
// is still handling messages, because all higher level
// destructors have been called. Since WINDOW is a base class,
// its destructor is virtual.
// ---------------------------------------------------------------------
WINDOW
(
const WINDOW& wndParent
, const WINDOW& wndOwner
, tCIDGui::eWNDSTYLES eStyle
, const WINDOW& wndBehind
, const AREA& areaInit = AREA(0,0,0,0)
, const STRGBUF& strbText = ""
, tCIDLib::CARD4 c4Id = 0
, PFNWP pfnWndProc = PFNWP(0)
);
WINDOW
(
HWND hwndWnd
);
~WINDOW();
// ---------------------------------------------------------------------
// Public, inherited, virtual methods
//
// FormatToStr
// Formats some debug info into the string.
// ---------------------------------------------------------------------
STDVPUBMETHODS(WINDOW,CIDOBJECT,tCIDLib::eFALSE);
virtual tCIDLib::VOID FormatToStr
(
STRGBUF& strbDest
) const;
// ---------------------------------------------------------------------
// Public, virtual methods
//
// bAdjustNewArea
// This method is called when the area of the window is about to be
// changed. This happens after the user sizes the window, but
// before the size change actually takes place. This method allows
// the new size to be adjusted before it is used to resize the
// window.
//
// This version just needs to return eFALSE to let it go to the
// default handler.
//
// bChar
// This method is called when non-extended chars are received. Non
// extended means the typeable characters, not function keys and
// such.
//
// bClick
// This method is called when a mouse click occurs. The eType parm
// indicates the type of mouse event and the pntPos is a POINT
// object that indicates the position of the event.
//
// bClose
// This method is called when the Close option is selected from the
// system menu. It is passed to frame windows. If eTRUE is returned
// the close of the application can be suppressed. The default
// action is to return eFALSE, letting it pass to the default
// handler when will close the application or dialog window.
//
// bDestroy
// This is called when the PM window is destroyed. This version
// does not need to do anything, but derived classes should clean
// up any resources related to the window. The low level message
// handler will zero out the window handle member after all classes
// have handled this message so that any further operations will
// cause an error. This default version does nothing.
//
// bEnableState
// This method is called when the window's enable state has
// changed. This default version does nothing.
//
// bExendedChar
// This method is related to bChar() but is called for extended
// characters, which are things like function keys and keypad keys.
// This default version handles looking for the F10 key and popping
// up the window's menu, if it has one. Otherwise, it just returns
// eFALSE to let the key go on to the default handler.
//
// bMoved
// This method is called when the window's origin moves relative to
// its parent, but not when it is moved along with its parent (thus
// keeping the same relative position.) This default version does
// nothing.
//
// bMouseMove
// This method is called when the mouse moves over the window. It
// receives a POINT object that indicates where the mouse was when
// the message was received.
//
// bPaint
// This method is called when the window gets a WM_PAINT message.
// The parameter is a reference to an AREA object that holds the
// invalidated area. This class provides the most basic painting by
// calling GpiErase().
//
// bPopUpMenu
// This method will pop up the menu for this window, if it has
// one. It is called internally when the WM_CONTEXTMENU message
// arrives.
//
// bPresParamChanged
// A presentation parameter has changed, so we need to requery our
// colors and redisplay if needed.
//
// bScrollEvent
// This method is called when a scroll bar child object wants to
// tell us about a scroll event.
//
// bShowState
// This method is called when the windows visibility state is set.
// The new visibility state is passed. This default version does
// nothing.
//
// bSizeChange
// This method is called when the window is resized. If the window
// has the size repaint style, this will be called when the window
// is sized in or out, otherwise only when the window is sized out.
// Note that the area is 0 based so only the size is relevant. The
// old size is also passed in case it allows the window to be more
// efficient.
//
// bSysColorChange
// A system color has been changed, so we need to requery our
// colors and redisplay.
//
// bUserMsg
// This is called for any user event message that is posted. The
// default here is to return eTRUE to eat the message, so that
// it does not go to the default window proc.
//
// SetDefMenu
// This will cause the window to install its default menu,
// destroying any existing popup menu for this window if the
// bDestroyOldMenu parm is eTRUE. The default version here does
// nothing. It generally will just call SetMenu() with its menu,
// passing on the destroy flag.
//
// SetMenu
// This menu will install the passed menu object as the top level
// menu for this window object. Optionally, the bDestroyOldMenu
// parameter can be set to eTRUE to cause the old menu (if any),
// to be destroyed. This parm defaults to eFALSE.
// ---------------------------------------------------------------------
virtual tCIDLib::eBOOL bAdjustNewArea
(
const AREA& areaNew
, AREA& areaModifed
, tCIDLib::eBOOL& bChange
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bChar
(
tCIDLib::CH chKey
, tCIDGui::eSHIFTKEYS eShifts
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bClick
(
tCIDGui::eMOUSECLKS eType
, const POINT& pntPos
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bClose
(
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bDestroy
(
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bEnableState
(
tCIDLib::eBOOL bNewEnable
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bExtendedChar
(
tCIDGui::eEXTKEYS eExtKey
, tCIDGui::eSHIFTKEYS eShifts
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bGettingFocus
(
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bLosingFocus
(
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bMoved
(
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bMouseMove
(
const POINT& pntPos
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bPaint
(
const AREA& areaInvalid
, PAINTBRUSH& ptbTarget
);
virtual tCIDLib::eBOOL bPopUpMenu
(
const POINT& pntPos
);
virtual tCIDLib::eBOOL bPresParamChanged
(
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bScrollEvent
(
tCIDLib::CARD4 c4ChildId
, tCIDGui::eSCROLLEV eScrollEvent
, tCIDLib::INT4 i4ScrollPos
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bSizeChanged
(
const AREA& areaNewSize
, const AREA& areaOldSize
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bSysColorChanged
(
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bShowState
(
tCIDLib::eBOOL bNewState
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL bUserMsg
(
tCIDLib::CARD4 c4Msg
, const MPARM& mp1
, const MPARM& mp2
) {return tCIDLib::eTRUE;}
virtual tCIDLib::VOID SetDefMenu
(
tCIDLib::eBOOL bDestroyOldMenu = tCIDLib::eFALSE
) {}
virtual tCIDLib::VOID SetMenu
(
POPUPMENU* pmenuNew
, tCIDLib::eBOOL bDestroyOldMenu = tCIDLib::eFALSE
);
// ---------------------------------------------------------------------
// Public, non-virtual methods
//
// operator HWND
// An implicit conversion to get the window handle. This is mainly
// for internal use so that we can pass WINDOW objects to PM APIs.
//
// areaWnd
// This method will get the area of the window.
//
// areaWndSize
// This method will get the size of the window. It returns a
// 0 based area that indicates the size of the window, but not its
// position relative to its parent.
//
// bGetPresColor
// This method will return the presentation color. If this color
// has not been defined for the particular window, eFALSE will be
// returned. If so, the appropriate system color should be
// queried.
//
// bGotFocus
// Returns eTRUE if this window has the focus, else eFALSE.
//
// bIsChildWindow
// Tests the passed window to see if it is a child (descendant
// actually) of this window object.
//
// bIsEnabled
// Returns eTRUE if this window is enabled.
//
// bIsShowing
// bIsVisible
// These methods will tell the caller if this window is showing or
// visible. Visibility is a function of the window's current
// visibility flag (set by Show() and Hide()), whereas showing
// means that the window is visible and is not totally covered
// by other windows.
//
// bMouseCaptured
// Returns eTRUE if this window has the mouse captured, else
// eFALSE.
//
// bQueryWndColor
// This method will first attempt to query the passed presparam
// color from this window. If it cannot be found, it will then
// query the passed system color and return that. It returns
// eTRUE if it got the presparam color and eFALSE if it got the
// system color.
//
// c4Id
// Gets the window id for this window
//
// c4WindowTextLen
// Returns the number of characters in the window text for this
// window object.
//
// CaptureMouse
// When a window calls this, it will get all mouse event messages
// until it calls ReleaseMouse().
//
// Disable
// Enable
// These methods will disable or enable this window object. If
// disabled, the window will not accept input from the user.
//
// eWndStyles
// This method will get/set the WINDOW class styles. When setting,
// there is a mask of bits and a mask of relevant bits. If the
// relevant bit is not set, then that style is not updated.
//
// ExitMsgLoop
// This will post a quit message to the message loop to cause it
// to exit.
//
// ForceRepaint
// This method will cause the window to get a paint method call
// with the entire window invalid.
//
// Hide
// Hides this window object
//
// hwndThis
// Returns the window handle for this window. It should not be
// abused!!!
//
// InvalidateArea
// This method will invalidate the passed area, causing the
// window to get a paint event, with this area as the update
// area.
//
// menuThis
// Returns a reference to the menu object for this window.
//
// pntWndOrg
// Returns the origin of the window.
//
// ReleaseMouse
// Releases the mouse, which was captured with CaptureMouse()
//
// ScrollArea
// This method will scroll the indicated area of the window by
// the indicated x and y relative pels. There is an optional
// version that clips the scroll area.
//
// SetPresColor
// This method will set the indicated presentation color to the
// passed color value.
//
// SetSWPFlags
// This method allows several operations to be done on a window
// at once. If the size or move options are used, then the AREA
// parameter must be present. If the 'z order' option is used,
// then the WINDOW parameter must be present.
//
// SetWndPos
// SetWndSize
// SetWndSizePos
// These methods set the size and/or position of the window.
//
// Show
// Set the show state of this window object to true.
//
// strWndText
// Gets/sets the text for this window.
//
// TakeFocus
// This window object takes the focus for himself.
//
// ToBottom
// ToTop
// These methods will move this window to the top of its
// siblings or to the bottom.
//
// TranslateCoord
// This method will translate coordinates from the passed
// source window's coordinate system to this window's.
//
// wndChildFromID
// Returns a reference to the child window object that has the
// passed id.
//
// wndChildUnderPnt
// Returns a reference to the child window of this window that is
// under the passed point. If bDeep is eTRUE, then all descendants
// are searched, otherwise only direct children.
//
// wndOwner
// wndParent
// Sets the owner or parent of this window object to the passed
// window object.
// ---------------------------------------------------------------------
operator HWND
(
) const {return __hwndThis;}
AREA areaWnd() const;
AREA areaWndSize() const;
tCIDLib::eBOOL bGotFocus() const;
tCIDLib::eBOOL bIsChildWindow
(
const WINDOW& wndTest
);
tCIDLib::eBOOL bIsEnabled() const;
tCIDLib::eBOOL bIsShowing() const;
tCIDLib::eBOOL bIsVisible() const;
tCIDLib::eBOOL bMouseCaptured
(
) const {return __bMouseCaptured;}
tCIDLib::eBOOL bQueryPresColor
(
tCIDGui::ePRESCLRS ePresClr
, RGBCLR& rgbClr
) const;
tCIDLib::eBOOL bQueryWndColor
(
tCIDGui::ePRESCLRS ePresClr
, tCIDGui::eSYSCOLORS eSysClr
, RGBCLR& rgbResult
) const;
tCIDLib::CARD4 c4Id
(
) const {return __c4Id;}
tCIDLib::CARD4 c4WindowTextLen() const;
tCIDLib::VOID CaptureMouse();
tCIDLib::VOID Disable();
tCIDLib::VOID Enable();
tCIDGui::eWNDSTYLES eWndStyles() const;
tCIDGui::eWNDSTYLES eWndStyles
(
tCIDGui::eWNDSTYLES eNewStyles
, tCIDGui::eWNDSTYLES eRelevant = tCIDGui::eWNDSTYLES(0xFFFFFFFF)
);
tCIDLib::VOID ExitMsgLoop();
tCIDLib::VOID ForceRepaint
(
tCIDLib::eBOOL bChildrenToo = tCIDLib::eTRUE
);
tCIDLib::VOID Hide();
HWND hwndThis
(
) const {return __hwndThis;}
tCIDLib::VOID InvalidateArea
(
const AREA& areaInvalidate
, tCIDLib::eBOOL bDoClippedChild = tCIDLib::eFALSE
);
POPUPMENU& menuThis
(
) const {return *__pmenuThis;}
POINT pntWndOrg() const;
tCIDLib::VOID ReleaseMouse();
tCIDLib::VOID ScrollArea
(
const AREA& areaScroll
, tCIDLib::INT4 i4CX
, tCIDLib::INT4 i4CY
, tCIDLib::eBOOL bInvalidate
, tCIDLib::eBOOL bScrollChildren = tCIDLib::eFALSE
);
tCIDLib::VOID ScrollArea
(
const AREA& areaScroll
, tCIDLib::INT4 i4CX
, tCIDLib::INT4 i4CY
, AREA& areaInvalidated
, const AREA& areaClip
, tCIDLib::eBOOL bInvalidate
, tCIDLib::eBOOL bScrollChildren = tCIDLib::eFALSE
);
tCIDLib::VOID SetPresColor
(
tCIDGui::ePRESCLRS ePresClr
, const RGBCLR& rgbClr
);
tCIDLib::VOID SetSWPFlags
(
tCIDGui::eSWPFLAGS eSwp
, const AREA& areaComponent = NUL_AREA
, const WINDOW& wndBehind = NUL_WINDOW
);
tCIDLib::VOID SetWndPos
(
const POINT& pntNewOrg
);
tCIDLib::VOID SetWndSize
(
tCIDLib::CARD4 c4CX
, tCIDLib::CARD4 c4CY
);
tCIDLib::VOID SetWndSizePos
(
const AREA& areaNew
);
tCIDLib::VOID Show();
const STRING& strWndText() const;
const STRING& strWndText
(
const STRGBUF& strbNewText
);
tCIDLib::VOID TakeFocus();
tCIDLib::VOID ToBottom();
tCIDLib::VOID ToTop();
tCIDLib::VOID TranslateCoord
(
POINT& pntTmp
, const WINDOW& wndSrc
);
WINDOW& wndChildFromId
(
tCIDLib::CARD4 c4Id
) const;
WINDOW& wndChildUnderPnt
(
const POINT& pntPos
, tCIDLib::eBOOL eDeep = tCIDLib::eFALSE
);
WINDOW& wndEnumChildren
(
const WINDOW& wndChild
, tCIDGui::eENUMCHILD eEnumChild
);
const WINDOW& wndOwner
(
const WINDOW& wndNewOwner
);
WINDOW& wndOwner() const;
const WINDOW& wndParent
(
const WINDOW& wndNewParent
, tCIDLib::eBOOL eRedraw = tCIDLib::eFALSE
);
WINDOW& wndParent() const;
protected :
// ---------------------------------------------------------------------
// Declare friend functions
//
// _pfnwpMainSub
// This is the central window proc that handles all message for all
// windows. It will just pass the window message info on to the
// _mresHandleMsg() procedure below.
// ---------------------------------------------------------------------
friend MRESULT EXPENTRY _pfnwpMainSub
(
HWND hwndThis
, tCIDLib::CARD4 c4Msg
, MPARAM mp1
, MPARAM mp2
);
// ---------------------------------------------------------------------
// Protected, inherited methods
//
// _bIsEqual
// This method is called from the public bIsEqual, which has
// determined that the objects are of comparable classes and are
// not the same object. It does the comparison down the class
// hierarchy.
// ---------------------------------------------------------------------
virtual tCIDLib::eBOOL _bIsEqual
(
const CIDOBJECT& objTarget
) const;
// ---------------------------------------------------------------------
// Protected, virtual methods
//
// _bCommand
// This method is called when a child window generates a command
// message. It needs to be processed by the derived class that
// understands it.
//
// _bControl
// This method is called when this window generates a control
// message. It needs to be processed by the derived class that
// understands it and (possibly) sent on to owner via the
// public versions.
//
// _bMinMaxFrame
// This method is called for FRAMEWND and its derivatives. It
// allows the object to control what happens. At this level we
// just return 0 to let the default action occur.
//
// _bQueryWndParms
// This is a protected method that is called when the window
// receives a WM_QUERYWINDOWPARAMS message. This is intended to
// support window text, and none of the custom window classes use
// any other window parms. Classes that handle real PM windows
// should override and return eFALSE to let it go to the default
// handler.
//
// _bSetWndParms
// This is the sibling of the query window parms. It will just do
// the window text. Classes that handle real PM windows should
// override and return eFALSE to let it go to the default handler.
//
// _InitMenu
// This is called before the popup menu is popped up. It allows
// derived classes to control the menu state.
//
// _wndEnumChildren
// This is called by the public wndEnumChildren to give derived
// types a chance to provide the cursor movement logic. If this
// guy returns eTRUE in bHandled it means he handled it, otherwise
// the default PM logic will be applied. This default returns
// eFALSE in bHandled and NUL_WINDOW for the return.
// ---------------------------------------------------------------------
virtual tCIDLib::eBOOL _bCommand
(
tCIDLib::CARD4 c4Command
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL _bControl
(
tCIDLib::CARD4 c4Code
, tCIDLib::CARD4 c4SrcWndId
, tCIDLib::CARD4 c4Data1 = 0
, tCIDLib::CARD4 c4Data2 = 0
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL _bMinMaxFrame
(
tCIDGui::eSWPFLAGS& eFlags
, const AREA& areaFrm
) {return tCIDLib::eFALSE;}
virtual tCIDLib::eBOOL _bQueryWndParams
(
tCIDLib::VOID* pParmBuf
) const;
virtual tCIDLib::eBOOL _bSetWndParams
(
tCIDLib::VOID* pParmBuf
);
virtual tCIDLib::VOID _InitMenu
(
POPUPMENU& menuPopUp
) {}
virtual WINDOW& _wndEnumChildren
(
const WINDOW& wndChild
, tCIDGui::eENUMCHILD eEnumChild
, tCIDLib::eBOOL& bHandled
) {bHandled=tCIDLib::eFALSE; return NUL_WINDOW;}
// ---------------------------------------------------------------------
// Protected, non-virtual methods
//
// _bPMPaint
// Get/set the __bPMPaint member. If this is eTRUE, then the
// bPaint method is not called, instead the paint is always passed
// to the default handler.
//
// _c4Id
// This method will set the id. Getting the id is public.
//
// _CreateCursor
// This method will create a PM cursor, which will destroy any
// other cursor that has been created.
//
// _hwndThis
// Sets the window handle. Getting it is done via a public method.
//
// _MoveCursor
// Moves the position of the PM cursor.
//
// _mresHandleMsg
// This is the method that is called from the central window
// procedure that handles all messages for all windows.
//
// _pfnWndProc
// This method will allow the default window proc to be set. For
// classes that enclose PM windows, this is that type of window's
// proc. For all CIDLib custom window classes, this is just the
// default window handler.
//
// _SendControl
// This method will send a control message to the owner, if one
// exists. It actually just calls the _bControl() method of
// the owner.
//
// _ShowCursor
// Makes the cursor visible or invisible, according to the passed
// flag.
//
// WINDOW
// The default constructor is protected because it should only be
// available to derived classes.
// ---------------------------------------------------------------------
tCIDLib::eBOOL _bPMPaint
(
) const {return __bPMPaint;}
tCIDLib::eBOOL _bPMPaint
(
tCIDLib::eBOOL bNew
) {__bPMPaint=bNew;return bNew;}
tCIDLib::CARD4 _c4Id
(
tCIDLib::CARD4 c4Id
) {__c4Id=c4Id; return c4Id;}
tCIDLib::VOID _CreateCursor
(
const AREA& areaCursor
, const AREA& areaClip
, tCIDGui::eCURSORS eCursorType
);
tCIDLib::VOID _DestroyCursor();
HWND _hwndThis
(
HWND hwndNew
) {__hwndThis=hwndNew; return __hwndThis;}
tCIDLib::VOID _MoveCursor
(
const POINT& pntNewPos
);
MRESULT _mresHandleMsg
(
HWND hwndThis
, tCIDLib::CARD4 c4Msg
, MPARAM mp1
, MPARAM mp2
);
PFNWP _pfnWndProc
(
) const {return __pfnWndProc;}
PFNWP _pfnWndProc
(
PFNWP pfnNewProc
) {__pfnWndProc=pfnNewProc; return pfnNewProc;}
tCIDLib::VOID _SendControl
(
tCIDLib::CARD4 c4Code
, tCIDLib::CARD4 c4SrcWndId
, tCIDLib::CARD4 c4Data1 = 0
, tCIDLib::CARD4 c4Data2 = 0
);
tCIDLib::VOID _ShowCursor
(
tCIDLib::eBOOL bState
);
WINDOW();
private :
// ---------------------------------------------------------------------
// Private data members
//
// __bDestructing
// This is set by the destructor before destroying the window
// so that the WM_DESTROY handling will know that it does not
// have to call the destructor.
//
// __bMouseCaptured
// Returns eTRUE if this window has the mouse captured.
//
// __bPMPaint
// This window represents a PM control window which must be
// allowed to handle the WM_PAINT message directly. The bPaint()
// method is not called for these objects, instead the paint is
// allowed to fall through
//
// __c4Id
// The id given to this window when it was created. A public
// method allows it to be retrived, but not set. It is set in the
// constructor and left untouched.
//
// __hwndThis
// The window handle for this window.
//
// __pmenuThis
// A pointer to the menu for this window. If there is no
// associated menu, it will be 0.
//
// __pfnWndProc
// A pointer to the window procedure which will receive messages
// that are not handled by the internal window code or by the
// derived class. For PM controls it will be the original window
// procedure. For others it will be the default window procedure.
//
// __strWndText
// Storage for the window text. When the text is queried, we get
// the window text into this and return a constant reference to
// it. It will be reallocated as needed to hold the text.
// ---------------------------------------------------------------------
tCIDLib::eBOOL __bDestructing;
tCIDLib::eBOOL __bMouseCaptured;
tCIDLib::eBOOL __bPMPaint;
tCIDLib::CARD4 __c4Id;
HWND __hwndThis;
POPUPMENU* __pmenuThis;
PFNWP __pfnWndProc;
STRING __strWndText;
};
#define NUL_WINDDOW (*(WINDOW*)0)
//
// Some global formatting functions to format our enums into a string buffer
// or text file object. The functions are in CIDGui_FmtType.Cpp.
//
STRGBUF& operator<<(STRGBUF& strbDest, tCIDGui::eMOUSECLKS);
OTXTFILE& operator<<(OTXTFILE& otfDest, tCIDGui::eMOUSECLKS);
#endif