[GME-commit] GMESRC/GME/PanningView PanningView.aps, NONE, 1.1 PanningViewCtrl.bmp, NONE, 1.1 PanningButton.cpp, NONE, 1.1 PanningView.cpp, NONE, 1.1 PanningViewCtrl.cpp, NONE, 1.1 PanningViewDlg.cpp, NONE, 1.1 PanningViewPropPage.cpp, NONE, 1.1
Log messages of CVS commits
gme-commit at list.isis.vanderbilt.edu
Mon Jun 2 12:40:56 CDT 2008
- Previous message: [GME-commit] GMESRC/GME/Gme GMEPanningWindow.cpp, NONE, 1.1 ChildFrm.cpp, 1.10, 1.11 GMEOLEApp.cpp, 1.16, 1.17 GMEPartBrowser.cpp, 1.2, 1.3 GMEView.cpp, 1.201, 1.202 MainFrm.cpp, 1.44, 1.45 PannButton.cpp, 1.10, NONE PanningWindow.cpp, 1.4, NONE
- Next message: [GME-commit] GMESRC/Doc/Tutorial Lesson1.html,1.8,1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /project/gme-repository/GMESRC/GME/PanningView
In directory escher:/tmp/cvs-serv30015/GME/PanningView
Added Files:
PanningView.aps PanningViewCtrl.bmp PanningButton.cpp
PanningView.cpp PanningViewCtrl.cpp PanningViewDlg.cpp
PanningViewPropPage.cpp
Log Message:
PanningView ActiveX control2
CVS User: (csaba)
--- NEW FILE: PanningViewDlg.cpp ---
// PanningViewDlg.cpp : implementation file
//
#include "stdafx.h"
#include "PanningViewDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPanningViewDlg dialog
CPanningViewDlg::CPanningViewDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPanningViewDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CPanningViewDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CPanningViewDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPanningViewDlg)
DDX_Control(pDX, IDC_PREVIEW, m_pvbutton);
//}}AFX_DATA_MAP
}
BOOL CPanningViewDlg::OnInitDialog()
{
BOOL ret = CDialog::OnInitDialog();
// TODO: Error checking
m_pvbutton.Create();
return ret;
}
void CPanningViewDlg::SetBitmapDC(CWnd* owner, CDC* bdc, CRect& ori, CRect& rect, COLORREF& bkgrnd)
{
m_pvbutton.SetBitmapDC(owner, bdc, ori, rect, bkgrnd);
}
void CPanningViewDlg::SetViewRect(CRect& vrect)
{
m_pvbutton.SetViewRect(vrect);
}
BEGIN_MESSAGE_MAP(CPanningViewDlg, CDialog)
//{{AFX_MSG_MAP(CPanningViewDlg)
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPanningViewDlg message handlers
void CPanningViewDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
CRect rc;
GetClientRect(rc);
if (m_pvbutton.m_hWnd)
m_pvbutton.MoveWindow(rc);
}
--- NEW FILE: PanningViewCtrl.cpp ---
// PanningViewCtrl.cpp : Implementation of the CPanningViewCtrl ActiveX Control class.
#include "stdafx.h"
#include "PanningView.h"
#include "PanningViewCtrl.h"
#include "PanningViewPropPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
IMPLEMENT_DYNCREATE(CPanningViewCtrl, COleControl)
// Message map
BEGIN_MESSAGE_MAP(CPanningViewCtrl, COleControl)
//{{AFX_MSG_MAP(CPanningViewCtrl)
ON_WM_CREATE()
//}}AFX_MSG_MAP
ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
END_MESSAGE_MAP()
// Dispatch map
BEGIN_DISPATCH_MAP(CPanningViewCtrl, COleControl)
//{{AFX_DISPATCH_MAP(CPanningViewCtrl)
DISP_FUNCTION_ID(CPanningViewCtrl, "SetBitmapDC", dispidSetBitmapDC, SetBitmapDC, VT_EMPTY, VTS_UI8 VTS_UI8 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_COLOR)
DISP_FUNCTION_ID(CPanningViewCtrl, "SetViewRect", dispidSetViewRect, SetViewRect, VT_EMPTY, VTS_I4 VTS_I4 VTS_I4 VTS_I4)
//}}AFX_DISPATCH_MAP
DISP_FUNCTION_ID(CPanningViewCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
END_DISPATCH_MAP()
// Event map
BEGIN_EVENT_MAP(CPanningViewCtrl, COleControl)
END_EVENT_MAP()
// Property pages
// TODO: Add more property pages as needed. Remember to increase the count!
BEGIN_PROPPAGEIDS(CPanningViewCtrl, 1)
PROPPAGEID(CPanningViewPropPage::guid)
END_PROPPAGEIDS(CPanningViewCtrl)
// Initialize class factory and guid
IMPLEMENT_OLECREATE_EX(CPanningViewCtrl, "PANNINGVIEW.PanningViewCtrl.1",
0xb0c28baa, 0x7e44, 0x404c, 0xbe, 0xad, 0x83, 0x73, 0x53, 0x56, 0xf1, 0xd2)
// Type library ID and version
IMPLEMENT_OLETYPELIB(CPanningViewCtrl, _tlid, _wVerMajor, _wVerMinor)
// Interface IDs
const IID BASED_CODE IID_DPanningView =
{ 0x3055658C, 0xDEFE, 0x4B68, { 0x9B, 0xC3, 0x21, 0xB1, 0x36, 0xBD, 0xBB, 0xDB } };
const IID BASED_CODE IID_DPanningViewEvents =
{ 0xBD4F784C, 0xA79F, 0x48F6, { 0x81, 0x8D, 0xB, 0x82, 0x9A, 0x6, 0x1C, 0xC0 } };
// Control type information
static const DWORD BASED_CODE _dwPanningViewOleMisc =
OLEMISC_ACTIVATEWHENVISIBLE |
OLEMISC_SETCLIENTSITEFIRST |
OLEMISC_INSIDEOUT |
OLEMISC_CANTLINKINSIDE |
OLEMISC_RECOMPOSEONRESIZE;
IMPLEMENT_OLECTLTYPE(CPanningViewCtrl, IDS_PANNINGVIEW, _dwPanningViewOleMisc)
// CPanningViewCtrl::CPanningViewCtrlFactory::UpdateRegistry -
// Adds or removes system registry entries for CPanningViewCtrl
BOOL CPanningViewCtrl::CPanningViewCtrlFactory::UpdateRegistry(BOOL bRegister)
{
// TODO: Verify that your control follows apartment-model threading rules.
// Refer to MFC TechNote 64 for more information.
// If your control does not conform to the apartment-model rules, then
// you must modify the code below, changing the 6th parameter from
// afxRegApartmentThreading to 0.
if (bRegister)
return AfxOleRegisterControlClass(
AfxGetInstanceHandle(),
m_clsid,
m_lpszProgID,
IDS_PANNINGVIEW,
IDB_PANNINGVIEW,
afxRegApartmentThreading,
_dwPanningViewOleMisc,
_tlid,
_wVerMajor,
_wVerMinor);
else
return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
}
// CPanningViewCtrl::CPanningViewCtrl - Constructor
CPanningViewCtrl::CPanningViewCtrl()
{
InitializeIIDs(&IID_DPanningView, &IID_DPanningViewEvents);
// TODO: Initialize your control's instance data here.
}
// CPanningViewCtrl::~CPanningViewCtrl - Destructor
CPanningViewCtrl::~CPanningViewCtrl()
{
// TODO: Cleanup your control's instance data here.
}
// CPanningViewCtrl::OnDraw - Drawing function
void CPanningViewCtrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
if (!pdc)
return;
if (m_panningViewDlg.GetSafeHwnd()) {
m_panningViewDlg.MoveWindow(rcBounds, TRUE);
} else {
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CBrush brush(RGB(255, 255, 255));
pdc->FillRect(rcBounds, &brush);
CRect edge(rcBounds);
pdc->DrawEdge(&edge, EDGE_BUMP, BF_RECT);
CString label("PanningView OCX");
BITMAP bm;
CBitmap bitmap;
bitmap.LoadBitmap(IDB_PANNINGVIEW);
bitmap.GetBitmap(&bm);
CSize size(bm.bmWidth, bm.bmHeight);
pdc->DPtoLP(&size);
CPoint org(0,0);
pdc->DPtoLP(&org);
CPoint pos(rcBounds.Width() / 2, rcBounds.Height() / 2 - (pdc->GetTextExtent(label).cy));
CDC dcMem;
dcMem.CreateCompatibleDC(pdc);
CBitmap* oldbitmap = dcMem.SelectObject(&bitmap);
dcMem.SetMapMode(pdc->GetMapMode());
pdc->BitBlt(pos.x, pos.y, size.cx, size.cy, &dcMem, org.x, org.y, SRCCOPY);
dcMem.SelectObject(oldbitmap);
pdc->SetTextAlign(TA_CENTER);
pdc->TextOut(rcBounds.Width() / 2, rcBounds.Height() / 2, CString("PanningView ActiveX Control"));
}
}
// CPanningViewCtrl::DoPropExchange - Persistence support
void CPanningViewCtrl::DoPropExchange(CPropExchange* pPX)
{
ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
COleControl::DoPropExchange(pPX);
// TODO: Call PX_ functions for each persistent custom property.
}
// CPanningViewCtrl::OnResetState - Reset control to default state
void CPanningViewCtrl::OnResetState()
{
COleControl::OnResetState(); // Resets defaults found in DoPropExchange
// TODO: Reset any other control state here.
}
// CPanningViewCtrl::AboutBox - Display an "About" box to the user
void CPanningViewCtrl::AboutBox()
{
CDialog dlgAbout(IDD_ABOUTBOX_PANNINGVIEW);
dlgAbout.DoModal();
}
// CPanningViewCtrl message handlers
int CPanningViewCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
if (m_panningViewDlg.Create(IDD_PANNINGVIEWDLG, this) == FALSE)
return -1;
return 0;
}
BOOL CPanningViewCtrl::PreCreateWindow(CREATESTRUCT& cs)
{
cs.dwExStyle |= WS_EX_CONTROLPARENT;
return COleControl::PreCreateWindow(cs);
}
void CPanningViewCtrl::SetBitmapDC(ULONGLONG ownerCWnd, ULONGLONG bCDC,
LONG orix, LONG oriy, LONG oriw, LONG orih,
LONG rx, LONG ry, LONG rw, LONG rh,
OLE_COLOR bkgrnd)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CWnd* owner = (CWnd*) ownerCWnd;
CDC* bdc = (CDC*) bCDC;
CRect ori(orix, oriy, orix + oriw, oriy + orih);
CRect rect(rx, ry, rx + rw, ry + rh);
COLORREF bgColor = TranslateColor(bkgrnd);
m_panningViewDlg.SetBitmapDC(owner, bdc, ori, rect, bgColor);
}
void CPanningViewCtrl::SetViewRect(LONG vrx, LONG vry, LONG vrw, LONG vrh)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CRect vrect(vrx, vry, vrx + vrw, vry + vrh);
m_panningViewDlg.SetViewRect(vrect);
}
void CPanningViewCtrl::SendDeleteDeviceContext(ULONGLONG bCDC)
{
this->FireDeleteDeviceContext(bCDC);
}
--- NEW FILE: PanningButton.cpp ---
// PannButton.cpp : implementation file
//
#include "stdafx.h"
#include "PanningButton.h"
#include "PanningViewCtrl.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPanningButton
CPanningButton::CPanningButton()
{
m_viewRectOnScreen = CRect(0, 0, 0, 0);
m_viewRectInMove = CRect(0, 0, 0, 0);
m_viewRectOnStored = CRect(0, 0, 0, 0);
m_bitmapDC = NULL;
m_bitmapSizeStored = CRect(0, 0, 0, 0);
m_bitmapSizeOri = CRect(0, 0, 0, 0);
m_owner = NULL;
m_sizeallh = NULL;
m_arrowh = NULL;
m_inMove = false;
m_storedToScreenRx = 0;
m_storedToScreenRy = 0;
m_oriToStoredRx = 0;
m_oriToStoredRy = 0;
}
CPanningButton::~CPanningButton()
{
if (m_bitmapDC)
SendDeleteDeviceContext(m_bitmapDC);
}
BEGIN_MESSAGE_MAP(CPanningButton, CWnd)
//{{AFX_MSG_MAP(CPanningButton)
ON_WM_PAINT()
ON_WM_MOUSEMOVE()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPanningButton message handlers
bool CPanningButton::Create()
{
m_sizeallh = ::LoadCursor(NULL, IDC_SIZEALL);
m_arrowh = ::LoadCursor(NULL, IDC_ARROW);
return true;
}
void CPanningButton::SetBitmapDC(CWnd* owner, CDC* bdc, CRect& orisize, CRect& actsize, COLORREF& bkgrnd) // may be empty
{
TRACE("SetBitmapDC\n");
if (m_bitmapDC)
SendDeleteDeviceContext(m_bitmapDC);
m_bitmapDC = bdc;
m_owner = owner;
m_bitmapSizeOri = orisize;
m_bitmapSizeStored = actsize;
m_backgorund = bkgrnd;
Invalidate();
UpdateWindow();
}
void CPanningButton::SetViewRect(CRect irect)
{
TRACE("SetViewRect\n");
// the method can be called even if the panning window is not visible
if (m_bitmapSizeOri.IsRectEmpty() || m_bitmapSizeStored.IsRectEmpty())
return;
if (!::IsWindow(GetSafeHwnd()))
return;
m_oriToStoredRx = (double)(m_bitmapSizeStored.Width()) / m_bitmapSizeOri.Width();
m_oriToStoredRy = (double)(m_bitmapSizeStored.Height()) / m_bitmapSizeOri.Height();
CRect newViewRectOnStored;
newViewRectOnStored.left = (int)(irect.left * m_oriToStoredRx);
newViewRectOnStored.right = (int)(irect.right * m_oriToStoredRx);
newViewRectOnStored.top = (int)(irect.top * m_oriToStoredRy);
newViewRectOnStored.bottom = (int)(irect.bottom * m_oriToStoredRy);
if (m_viewRectOnStored.EqualRect(&newViewRectOnStored))
return;
else
m_viewRectOnStored = newViewRectOnStored;
CRect vRect(0, 0, 0, 0);
CRect client;
GetParent()->GetClientRect(&client);
BmpToScreen(client);
ViewRectToScreen(vRect);
InvalidateRect(&m_viewRectOnScreen, FALSE);
m_viewRectOnScreen = vRect;
InvalidateRect(&vRect, FALSE);
UpdateWindow();
}
void CPanningButton::BmpToScreen(CRect clientr)
{
double dx = (double)(clientr.Width()) / m_bitmapSizeStored.Width();
double dy = (double)(clientr.Height()) / m_bitmapSizeStored.Height();
double dd = (dx <= dy) ? dx: dy;
dd = (dd < 1)? dd: 1;
clientr.right = min(clientr.right, (LONG)(dd * m_bitmapSizeStored.Width()));
clientr.bottom = min(clientr.bottom, (LONG)(dd * m_bitmapSizeStored.Height()));
m_bitmapOnScreen = clientr;
}
void CPanningButton::ViewRectToScreen(CRect &vRect)
{
m_storedToScreenRx = (double)(m_bitmapOnScreen.Width()) / m_bitmapSizeStored.Width();
m_storedToScreenRy = (double)(m_bitmapOnScreen.Height()) / m_bitmapSizeStored.Height();
vRect = CRect(0, 0, 0, 0);
vRect.left = (LONG)(m_viewRectOnStored.left * m_storedToScreenRx);
vRect.right = (LONG)(m_viewRectOnStored.right * m_storedToScreenRx);
vRect.top = (LONG)(m_viewRectOnStored.top * m_storedToScreenRy);
vRect.bottom = (LONG)(m_viewRectOnStored.bottom * m_storedToScreenRy);
vRect.right = min(vRect.right, m_bitmapOnScreen.right);
vRect.bottom = min(vRect.bottom, m_bitmapOnScreen.bottom);
}
void CPanningButton::SendDeleteDeviceContext(CDC* bCDC)
{
CWnd* wnd = GetParent(); // Dlg Window
if (wnd != NULL)
wnd = wnd->GetParent(); // OLE Control Window
if (wnd->IsKindOf(RUNTIME_CLASS(CPanningViewCtrl))) {
CPanningViewCtrl* ctrl = STATIC_DOWNCAST(CPanningViewCtrl, wnd);
ctrl->SendDeleteDeviceContext((ULONGLONG) bCDC);
}
}
void CPanningButton::OnPaint()
{
CPaintDC dc(this); // device context for painting
dc.SetMapMode(MM_TEXT);
// clear it
CRect clientr;
GetParent()->GetClientRect(&clientr);
CBrush brush;
COLORREF col;
if (!m_bitmapDC) {
DWORD dw = GetSysColor(COLOR_3DFACE);
BYTE r = GetRValue(dw);
BYTE g = GetGValue(dw);
BYTE b = GetBValue(dw);
col = RGB(r,g,b);
} else {
col = m_backgorund;
}
brush.CreateSolidBrush(col);
dc.FillRect(&clientr, &brush);
// no bitmap - return
if (!m_bitmapDC)
return;
m_bitmapDC->SetMapMode(MM_TEXT);
// transform bitmap to screen
BmpToScreen(clientr);
// TODO: Error checking
BOOL ret = dc.StretchBlt(0, 0, m_bitmapOnScreen.Width(), m_bitmapOnScreen.Height(), m_bitmapDC,
0, 0, m_bitmapSizeStored.Width(), m_bitmapSizeStored.Height(), SRCCOPY);
if( !ret)
return;
ASSERT(ret);
CBrush brush1;
DWORD dw1 = GetSysColor(COLOR_WINDOWTEXT);
BYTE r1 = GetRValue(dw1);
BYTE g1 = GetGValue(dw1);
BYTE b1 = GetBValue(dw1);
brush1.CreateSolidBrush(RGB(r1, g1, b1));
if (!m_viewRectOnStored.IsRectEmpty() && m_viewRectOnScreen != m_bitmapOnScreen &&
!m_viewRectOnScreen.IsRectEmpty())
{
TRACE("m_viewRectOnScreen: w:%d, h:%d, m_bitmapOnScreen: w:%d, h:%d\n", m_viewRectOnScreen.Width(),
m_viewRectOnScreen.Height(), m_bitmapOnScreen.Width(), m_bitmapOnScreen.Height());
if (!m_inMove) {
CRect vRect(0, 0, 0, 0);
ViewRectToScreen(vRect);
m_viewRectOnScreen = vRect;
dc.FrameRect(&m_viewRectOnScreen, &brush1);
} else {
dc.FrameRect(&m_viewRectInMove, &brush1);
}
}
}
void CPanningButton::OnMouseMove(UINT nFlags, CPoint point)
{
if (m_viewRectOnScreen.PtInRect(point) || m_inMove)
SetCursor(m_sizeallh);
else
SetCursor(m_arrowh);
if (m_inMove) {
// move panning frame only
int dx = point.x - m_moveStartPoint.x;
int dy = point.y - m_moveStartPoint.y;
CRect trackRect = m_viewRectOnScreen;
trackRect.OffsetRect(dx, dy);
CRect shadow;
shadow.IntersectRect(&trackRect, &m_bitmapOnScreen);
if (shadow.Width() != trackRect.Width() && shadow.Height() != trackRect.Height())
return;
if (m_viewRectInMove.IsRectEmpty())
InvalidateRect(&m_viewRectOnScreen, FALSE);
else
InvalidateRect(&m_viewRectInMove, FALSE);
if (shadow.Width() != trackRect.Width()) {
if (trackRect.left < 0)
trackRect.OffsetRect(-trackRect.left, 0);
else
trackRect.OffsetRect(m_bitmapOnScreen.right - trackRect.right, 0);
} else if (shadow.Height() != trackRect.Height()) {
if (trackRect.top < 0)
trackRect.OffsetRect(0, -trackRect.top);
else
trackRect.OffsetRect(0, m_bitmapOnScreen.bottom - trackRect.bottom);
}
m_viewRectInMove = trackRect;
InvalidateRect(&m_viewRectInMove, FALSE);
UpdateWindow();
}
CWnd::OnMouseMove(nFlags, point);
}
void CPanningButton::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if (m_viewRectOnScreen.PtInRect(point)) {
SetCursor(m_sizeallh);
SetCapture();
m_inMove = true;
m_moveStartPoint = point;
m_moveStartRect = m_viewRectOnScreen;
} else {
SetCursor(m_arrowh);
}
CWnd::OnLButtonDown(nFlags, point);
}
void CPanningButton::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if (m_inMove) {
ReleaseCapture();
m_inMove = false;
// CWnd* mainw = AfxGetMainWnd();
if (m_owner) { // mainw)
double dx = point.x - m_moveStartPoint.x;
double dy = point.y - m_moveStartPoint.y;
// dx, dy in pann win screen coordinates
// calculate real screen coordinates
dx /= m_storedToScreenRx;
dy /= m_storedToScreenRy;
dx /= m_oriToStoredRx;
dy /= m_oriToStoredRy;
m_owner->PostMessage(WM_PANN_SCROLL, (WPARAM)(int)dx, (LPARAM)(int)dy);
Invalidate();
}
m_viewRectInMove = CRect(0, 0, 0, 0);
m_moveStartPoint = CPoint(0, 0);
m_moveStartRect = CRect(0, 0, 0, 0);
}
CWnd::OnLButtonUp(nFlags, point);
}
--- NEW FILE: PanningViewPropPage.cpp ---
// PanningViewPropPage.cpp : Implementation of the CPanningViewPropPage property page class.
#include "stdafx.h"
#include "PanningView.h"
#include "PanningViewPropPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
IMPLEMENT_DYNCREATE(CPanningViewPropPage, COlePropertyPage)
// Message map
BEGIN_MESSAGE_MAP(CPanningViewPropPage, COlePropertyPage)
END_MESSAGE_MAP()
// Initialize class factory and guid
IMPLEMENT_OLECREATE_EX(CPanningViewPropPage, "PANNINGVIEW.PanningViewPropPage.1",
0x458d3476, 0xb3ff, 0x4545, 0x96, 0x45, 0xc2, 0x47, 0xa7, 0xc1, 0x7e, 0x36)
// CPanningViewPropPage::CPanningViewPropPageFactory::UpdateRegistry -
// Adds or removes system registry entries for CPanningViewPropPage
BOOL CPanningViewPropPage::CPanningViewPropPageFactory::UpdateRegistry(BOOL bRegister)
{
if (bRegister)
return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
m_clsid, IDS_PANNINGVIEW_PPG);
else
return AfxOleUnregisterClass(m_clsid, NULL);
}
// CPanningViewPropPage::CPanningViewPropPage - Constructor
CPanningViewPropPage::CPanningViewPropPage() :
COlePropertyPage(IDD, IDS_PANNINGVIEW_PPG_CAPTION)
{
}
// CPanningViewPropPage::DoDataExchange - Moves data between page and properties
void CPanningViewPropPage::DoDataExchange(CDataExchange* pDX)
{
DDP_PostProcessing(pDX);
}
// CPanningViewPropPage message handlers
--- NEW FILE: PanningViewCtrl.bmp ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: PanningView.cpp ---
// PanningView.cpp : Implementation of CPanningViewApp and DLL registration.
#include "stdafx.h"
#include "PanningView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
CPanningViewApp NEAR theApp;
const GUID CDECL BASED_CODE _tlid =
{ 0xB6ED16CA, 0x512F, 0x48B7, { 0xB5, 0xDB, 0x1C, 0x6, 0x48, 0x21, 0xF7, 0xDB } };
const WORD _wVerMajor = 1;
const WORD _wVerMinor = 0;
// CPanningViewApp::InitInstance - DLL initialization
BOOL CPanningViewApp::InitInstance()
{
BOOL bInit = COleControlModule::InitInstance();
if (bInit)
{
// TODO: Add your own module initialization code here.
}
return bInit;
}
// CPanningViewApp::ExitInstance - DLL termination
int CPanningViewApp::ExitInstance()
{
// TODO: Add your own module termination code here.
return COleControlModule::ExitInstance();
}
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
--- NEW FILE: PanningView.aps ---
(This appears to be a binary file; contents omitted.)
- Previous message: [GME-commit] GMESRC/GME/Gme GMEPanningWindow.cpp, NONE, 1.1 ChildFrm.cpp, 1.10, 1.11 GMEOLEApp.cpp, 1.16, 1.17 GMEPartBrowser.cpp, 1.2, 1.3 GMEView.cpp, 1.201, 1.202 MainFrm.cpp, 1.44, 1.45 PannButton.cpp, 1.10, NONE PanningWindow.cpp, 1.4, NONE
- Next message: [GME-commit] GMESRC/Doc/Tutorial Lesson1.html,1.8,1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list