summaryrefslogtreecommitdiff
path: root/win/Cadview.cpp
diff options
context:
space:
mode:
authorleo2006-01-24 04:48:40 +0000
committerleo2006-01-24 04:48:40 +0000
commit3cf202f177cffb3b962420933ab8d9481b0d8f32 (patch)
treebb3b66c0f6948443b4b6230841d8e39ad737cafd /win/Cadview.cpp
parent8773592dd2a7f096b29d91b750437ac60b4584f8 (diff)
Added the ability to zoom and rotate the Piece Preview.
git-svn-id: http://svn.leocad.org/trunk@460 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'win/Cadview.cpp')
-rw-r--r--win/Cadview.cpp39
1 files changed, 6 insertions, 33 deletions
diff --git a/win/Cadview.cpp b/win/Cadview.cpp
index 58fe3ff..9e26db1 100644
--- a/win/Cadview.cpp
+++ b/win/Cadview.cpp
@@ -114,36 +114,6 @@ BOOL CCADView::PreCreateWindow(CREATESTRUCT& cs)
void CCADView::OnDraw(CDC* /*pDC*/)
{
- static int added = 0;
-
- if (!added)
- {
- m_pView->OnInitialUpdate ();
- added = 1;
- }
-
-// m_pView->OnDraw ();
-// project->Render(false);
-/*
- CCADDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
-
- if (m_pPixels)
- {
- glViewport(0, 0, pDoc->m_szView.cx, pDoc->m_szView.cy);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluOrtho2D(0, pDoc->m_szView.cx, 0, pDoc->m_szView.cy);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glRasterPos2i(0, 0);
- glDrawPixels(pDoc->m_szView.cx, pDoc->m_szView.cy, GL_RGBA, GL_UNSIGNED_BYTE, m_pPixels);
- }
- else
- pDoc->Render(FALSE);
-
- pfnwglSwapBuffers (pfnwglGetCurrentDC());
-*/
}
/////////////////////////////////////////////////////////////////////////////
@@ -769,7 +739,7 @@ int CCADView::OnCreate(LPCREATESTRUCT lpCreateStruct)
m_pView = new View (project, NULL);
m_pView->Create (m_hWnd);
-// m_pView->OnInitialUpdate ();
+ m_pView->OnInitialUpdate ();
SetTimer (IDT_LC_SAVETIMER, 5000, NULL);
@@ -1052,10 +1022,13 @@ LRESULT CCADView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
if (m_pView)
{
MSG msg;
- msg.message = message;
+
+ msg.message = message;
msg.wParam = wParam;
msg.lParam = lParam;
- GLWindowPreTranslateMessage (m_pView, &msg);
+
+ if (GLWindowPreTranslateMessage(m_pView, &msg))
+ return TRUE;
}
return CView::WindowProc(message, wParam, lParam);