summaryrefslogtreecommitdiff
path: root/win/Pieceprv.cpp
diff options
context:
space:
mode:
authorleo2006-01-24 04:48:40 +0000
committerleo2006-01-24 04:48:40 +0000
commit3cf202f177cffb3b962420933ab8d9481b0d8f32 (patch)
treebb3b66c0f6948443b4b6230841d8e39ad737cafd /win/Pieceprv.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/Pieceprv.cpp')
-rw-r--r--win/Pieceprv.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/win/Pieceprv.cpp b/win/Pieceprv.cpp
index bf1a714..c07cea9 100644
--- a/win/Pieceprv.cpp
+++ b/win/Pieceprv.cpp
@@ -53,7 +53,7 @@ void CPiecePreview::OnPaint()
if (!IsWindowEnabled() || (m_Preview == NULL))
return;
- m_Preview->OnDraw();
+// m_Preview->OnDraw();
}
void CPiecePreview::OnSize(UINT nType, int cx, int cy)
@@ -95,3 +95,20 @@ PieceInfo* CPiecePreview::GetPieceInfo() const
{
return m_Preview->GetCurrentPiece();
}
+
+BOOL GLWindowPreTranslateMessage (GLWindow *wnd, MSG *pMsg);
+LRESULT CPiecePreview::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ if (m_Preview)
+ {
+ MSG msg;
+ msg.message = message;
+ msg.wParam = wParam;
+ msg.lParam = lParam;
+
+ if (GLWindowPreTranslateMessage(m_Preview, &msg))
+ return TRUE;
+ }
+
+ return CWnd::WindowProc(message, wParam, lParam);
+}