From 3cf202f177cffb3b962420933ab8d9481b0d8f32 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 24 Jan 2006 04:48:40 +0000 Subject: Added the ability to zoom and rotate the Piece Preview. git-svn-id: http://svn.leocad.org/trunk@460 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- win/Pieceprv.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'win/Pieceprv.cpp') 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); +} -- cgit v1.2.3