OSDN Git Service

PATCH: [ 1208198 ] Update CMoveConstraint with settable grip
authorPerry Rapp <elsapo@users.sourceforge.net>
Tue, 24 May 2005 23:41:35 +0000 (23:41 +0000)
committerPerry Rapp <elsapo@users.sourceforge.net>
Tue, 24 May 2005 23:41:35 +0000 (23:41 +0000)
  Src/Common: CMoveConstraint.cpp CMoveConstraint.h

Src/Common/CMoveConstraint.cpp
Src/Common/CMoveConstraint.h

index 45fd101..4e93a5d 100644 (file)
@@ -1,8 +1,8 @@
 /*!
   \file    CMoveConstraint.cpp
-  \author  Perry Rapp, Creator, 1998-2003
+  \author  Perry Rapp, Creator, 1998-2004
   \date    Created: 1998
-  \date    Edited:  2003/10/04 PR
+  \date    Edited:  2004/04/22 Perry Rapp
 
   \brief   Implementation of CMoveConstraint
 
@@ -58,6 +58,7 @@ static RECT getGripRect(HWND hwnd)
        return rc;
 }
 
+CMoveConstraint::EGRIP CMoveConstraint::c_defGrip = SG_NORMAL;
 
 CMoveConstraint::Constraint::Constraint()
 {
@@ -251,7 +252,7 @@ CMoveConstraint::ClearMostData()
        // m_rectDlgOriginal
        m_nOrigX=0;
        m_nOrigY=0;
-       m_nGrip=SG_NORMAL;
+       m_nGrip=c_defGrip;
        m_bOriginalFetched=false;
        m_nMinX=0;
        m_nMinY=0;
index a860559..3545d99 100644 (file)
@@ -1,8 +1,8 @@
 /*!
   \file    CMoveConstraint.h
-  \author  Perry Rapp, Creator, 1998-2003
+  \author  Perry Rapp, Creator, 1998-2004
   \date    Created: 1998
-  \date    Edited:  2003/10/04 PR
+  \date    Edited:  2004/04/22 PR
 
   \brief   Declaration of CMoveConstraint
 
@@ -77,6 +77,12 @@ class ConstraintData;
 
 class CMoveConstraint
 {
+       enum EGRIP { SG_NONE, SG_NORMAL, SG_PARENTSTATE };
+       static EGRIP c_defGrip; // class-wide default sizing grip setting
+
+public:
+       static void SetDefGrip(EGRIP nDefGrip) { c_defGrip = nDefGrip; }
+
 public:
 
        // add a MoveConstraint member to dialog or view
@@ -138,7 +144,6 @@ public:
        void ConstrainNonChildren() { m_bConstrainNonChildren = true; }
 
        // embedded windows, such as property pages or formviews, should set the size grip to none
-       enum EGRIP { SG_NONE, SG_NORMAL, SG_PARENTSTATE };
        void SetSizeGrip(EGRIP nGrip) { m_nGrip = nGrip; }
        // either Subclass or call a WindowProc
        bool SubclassWnd();