|
¸®Ä¡¿¡µðÆ® ÄÜÆ®·Ñ 2.0Àº À©95ºÎÅÍ Áö¿ø µÇ¾úÁö¸¸,
¿ØÀÏÀÎÁö ¸¶¼Ò´Â 2.0 ÄÜÆ®·ÑÀ» MFC Ŭ·¡½º³ª VS Ç¥ÁØ ÄÜÆ®·Ñ·Î ä¿ëÇÏÁö
¾Ê°í ÀÖ½À´Ï´Ù.
¸®Ä¡¿¡µðÆ® 2.0Àº undo/redo ±â´Éµµ ÀÖ°í, url ÀÚµ¿ °¨Áö ±â´É,
1.0 º¸´Ù ÅØ½ºÆ®¿¡ ÈξÀ ´Ù¾çÇÑ È¿°ú¸¦ ÁÙ¼öµµ ÀÖÀ¸¸ç,
±âŸ 1.0 º¸´Ù ¸¹Àº dzºÎÇÑ ±â´ÉÀ» °¡Áö°í ÀÖ½À´Ï´Ù.
±×·¡¼, ´Ü ¸î ÁÙ ¸¸ Ãß°¡ÇÏ¸é ±âÁ¸ MFCÀÇ ¸®Ä¡¿¡µðÆ® ºä³ª ÄÜÆ®·ÑÀ»
±×´ë·Î »ç¿ëÇϸ鼵µ ¸®Ä¡¿¡µðÆ® 2.0 ÄÜÆ®·ÑÀ» »ç¿ëÇÒ ¼ö ÀÖ´Â ¹æ¹ýÀ» ¾Ë·Áµå¸®°Ú½À´Ï´Ù.
(´Ù ÀÌ·¸°Ô ¾²°í ÀÖ´ÂÁöµµ ¸ð¸£°Ú±º¿ä.^^)
¾î·µç... ¸¸¾à RICH2View¶õ ¸®Ä¡¿¡µðÆ® 1.0 ºä¸¦ »ó¼ÓÇÑ ºä Ŭ·¡½º°¡ ÀÖ´Ù¸é ÀÏ´Ü ±× Ŭ·¡½º¿¡
HINSTANCE m_hinstRichEdit2
¶õ µ¥ÀÌÅÍ ¸â¹ö¸¦ Ãß°¡ÇÕ´Ï´Ù.
±×·± ÈÄ, ±× »ý¼ºÀÚ¿¡¼ ´ÙÀ½Ã³·³ ¸®Ä¡¿¡µðÆ® 2.0 dllÀ» ·ÎµåÇϰí
¾Õ¼ Ãß°¡ÇÑ ¸â¹ö¿¡ ÇÒ´çÇÕ´Ï´Ù.
RICH2View::RICH2View()
{
// TODO: add construction code here
m_hinstRichEdit2 = LoadLibraryA("RICHED20.DLL");
}
ÆÄ±«ÀÚ¿¡¼´Â ´ÙÀ½Ã³·³ ÇØÁ¦½ÃŰ¸é µË´Ï´Ù.
RICH2View::~RICH2View()
{
if(m_hinstRichEdit2)
FreeLibrary(m_hinstRichEdit2);
}
±×·± ÈÄ, PreCreateWindow(...) ¿¡¼ »ç¿ëÇÒ Å¬·¡½º À̸§À» ¸®Ä¡¿¡µðÆ® 2.0 Ŭ·¡½º·Î
¹Ù²ãÄ¡±â ÇÏ´Â °Ì´Ï´Ù. ´ÙÀ½Ã³·³¿ä.
BOOL RICH2View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by
modifying
// the CREATESTRUCT cs
if(m_hinstRichEdit2)
{
#ifdef UNICODE
m_strClass
= "RichEdit20W";
#else
m_strClass
= "RichEdit20A";
#endif
if(!CCtrlView::PreCreateWindow(cs))
return
FALSE;
cs.lpszName = _T("");
cs.cx = cs.cy = 100; // necessary
to avoid bug with ES_SELECTIONBAR and zero for cx and cy
cs.style |= WS_CLIPSIBLINGS;
return TRUE;
}
else
{
AfxMessageBox(IDS_RICHEDIT2_LOAD_FAILED);
return CRichEditView::PreCreateWindow(cs);
}
}
±×¸®°í ¸¶Áö¸·À¸·Î, OnDestroy() ¿¡¼ ´ÙÀ½ ³»¿ëÀ» ÄÚ¸àÆ® ó¸®ÇØÁÖ½Ã¸é µË´Ï´Ù.
COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
if (pActiveItem != NULL && pActiveItem->GetActiveView()
== this)
{
pActiveItem->Deactivate();
ASSERT(GetDocument()->GetInPlaceActiveItem(this)
== NULL);
}
È®ÀÎÀº ½ºÆÄÀÌ++·Î Âï¾îº¸½Ã¸é µÇ°ÚÁÒ.
|