91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 70KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-16
  • 語言: C/C++
  • 標簽: MFC??圖像繪制??

資源簡介

用MFC實現了類似于畫圖板的簡單的圖形繪制. 方便大家學習……

資源截圖

代碼片段和文件信息

//?CntrItem.cpp?:?implementation?of?the?CDrawItem?class
//

#include?“stdafx.h“
#include?“DrawCli.h“

#include?“DrawDoc.h“
#include?“DrawVw.h“
#include?“DrawObj.h“
#include?“CntrItem.h“

#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
//?CDrawItem?implementation

IMPLEMENT_SERIAL(CDrawItem?COleClientItem?0)
/*
CDrawItem::CDrawItem(CDrawDoc*?pContainer)
:?COleClientItem(pContainer)
{
//?TODO:?add?one-time?construction?code?here
}
*/
CDrawItem::CDrawItem(CDrawDoc*?pContainer?CDrawOleObj*?pDrawObj)
:?COleClientItem(pContainer)
{
m_pDrawObj?=?pDrawObj;
}

CDrawItem::~CDrawItem()
{
//?TODO:?add?cleanup?code?here

}

void?CDrawItem::onchange(OLE_NOTIFICATION?nCode?DWORD?dwParam)
{
ASSERT_VALID(this);

COleClientItem::onchange(nCode?dwParam);

//?When?an?item?is?being?edited?(either?in-place?or?fully?open)
//??it?sends?onchange?notifications?for?changes?in?the?state?of?the
//??item?or?visual?appearance?of?its?content.

//?TODO:?invalidate?the?item?by?calling?UpdateAllViews
//??(with?hints?appropriate?to?your?application)

GetDocument()->UpdateAllViews(NULL);
//?for?now?just?update?ALL?views/no?hints
}

BOOL?CDrawItem::onchangeItemPosition(const?CRect&?rectPos)
{
ASSERT_VALID(this);

//?During?in-place?activation?CDrawItem::onchangeItemPosition
//??is?called?by?the?server?to?change?the?position?of?the?in-place
//??window.??Usually?this?is?a?result?of?the?data?in?the?server
//??document?changing?such?that?the?extent?has?changed?or?as?a?result
//??of?in-place?resizing.
//
//?The?default?here?is?to?call?the?base?class?which?will?call
//??COleClientItem::SetItemRects?to?move?the?item
//??to?the?new?position.

if?(!COleClientItem::onchangeItemPosition(rectPos))
return?FALSE;

//?TODO:?update?any?cache?you?may?have?of?the?item‘s?rectangle/extent

return?TRUE;
}

void?CDrawItem::OnGetItemPosition(CRect&?rPosition)
{
ASSERT_VALID(this);

//?During?in-place?activation?CDrawItem::OnGetItemPosition
//??will?be?called?to?determine?the?location?of?this?item.??The?default
//??implementation?created?from?AppWizard?simply?returns?a?hard-coded
//??rectangle.??Usually?this?rectangle?would?reflect?the?current
//??position?of?the?item?relative?to?the?view?used?for?activation.
//??You?can?obtain?the?view?by?calling?CDrawItem::GetActiveView.

//?TODO:?return?correct?rectangle?(in?pixels)?in?rPosition

rPosition.SetRect(10?10?210?210);
}

void?CDrawItem::onactivate()
{
????//?Allow?only?one?inplace?activate?item?per?frame
????CDrawView*?pView?=?GetActiveView();
????ASSERT_VALID(pView);
????COleClientItem*?pItem?=?GetDocument()->GetInPlaceActiveItem(pView);
????if?(pItem?!=?NULL?&&?pItem?!=?this)
????????pItem->Close();
????
????COleClientItem::onactivate();
}

void?CDrawItem::ondeactivateUI(BOOL?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????5095??2000-05-12?13:37??DrawCli\CntrItem.cpp

?????文件???????1895??2000-05-12?13:37??DrawCli\CntrItem.h

?????文件??????38932??2010-11-11?09:26??DrawCli\DrawCli.aps

?????文件???????5596??2010-11-11?09:26??DrawCli\DrawCli.clw

?????文件???????4752??2000-05-07?09:49??DrawCli\DrawCli.cpp

?????文件???????5376??2010-11-11?09:22??DrawCli\DrawCli.dsp

?????文件????????539??2010-11-11?09:26??DrawCli\DrawCli.dsw

?????文件???????1424??2000-05-07?09:37??DrawCli\DrawCli.h

?????文件??????82944??2010-11-11?09:28??DrawCli\DrawCli.ncb

?????文件??????48640??2010-11-11?09:28??DrawCli\DrawCli.opt

?????文件????????248??2010-11-11?09:28??DrawCli\DrawCli.plg

?????文件??????20836??2000-05-12?14:41??DrawCli\DrawCli.rc

?????文件???????4613??2000-05-12?15:01??DrawCli\DrawDoc.cpp

?????文件???????1804??2000-05-12?14:57??DrawCli\DrawDoc.h

?????文件??????18371??2002-04-01?17:49??DrawCli\DrawObj.cpp

?????文件???????3524??2000-05-12?12:27??DrawCli\DrawObj.h

?????文件???????8726??2000-05-12?11:37??DrawCli\DrawTool.cpp

?????文件???????2256??2000-05-12?11:36??DrawCli\DrawTool.h

?????文件??????27291??2010-05-28?23:16??DrawCli\DrawVw.cpp

?????文件???????5374??2000-05-12?15:45??DrawCli\DrawVw.h

?????文件???????3406??2000-05-12?14:47??DrawCli\MainFrm.cpp

?????文件???????1525??2000-05-12?14:44??DrawCli\MainFrm.h

?????文件???????2749??2000-05-12?10:53??DrawCli\RectDlg.cpp

?????文件???????1495??2000-05-12?10:52??DrawCli\RectDlg.h

?????文件???????1078??2000-05-07?09:20??DrawCli\RES\DrawCli.ico

?????文件????????399??2000-05-07?09:20??DrawCli\RES\DrawCli.rc2

?????文件???????1078??2000-05-07?09:20??DrawCli\RES\DrawDoc.ico

?????文件???????1198??2000-05-07?09:20??DrawCli\RES\Toolbar.bmp

?????文件???????1678??2000-05-12?14:20??DrawCli\RES\TOOLBAR1.BMP

?????文件???????2122??2000-05-12?14:41??DrawCli\RESOURCE.H

............此處省略9個文件信息

評論

共有 條評論