29 #include "../../idlib/precompiled.h"
39 static char THIS_FILE[] = __FILE__;
57 BEGIN_MESSAGE_MAP(
CZWnd, CWnd)
84 int CZWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
86 if (CWnd::OnCreate(lpCreateStruct) == -1)
89 m_dcZ = ::GetDC(GetSafeHwnd());
90 QEW_SetupPixelFormat(m_dcZ,
false);
119 Z_MouseDown (point.x, rctZ.Height() - 1 - point.y , nFlags);
128 Z_MouseDown (point.x, rctZ.Height() - 1 - point.y , nFlags);
137 Z_MouseDown (point.x, rctZ.Height() - 1 - point.y , nFlags);
152 QE_CheckOpenGLForErrors();
156 qwglSwapBuffers(dc.m_hDC);
163 lpMMI->ptMinTrackSize.x = ZWIN_WIDTH;
170 float fz =
z.origin[2] + ((rctZ.Height() - 1 - point.y) - (
z.height/2)) /
z.scale;
171 fz = floor(fz / g_qeglobals.d_gridsize + 0.5) * g_qeglobals.d_gridsize;
173 strStatus.Format(
"Z:: %.1f", fz);
175 Z_MouseMoved (point.x, rctZ.Height() - 1 - point.y, nFlags);
180 CWnd::OnSize(nType, cx, cy);
183 z.width = rctZ.right;
184 z.height = rctZ.bottom;
194 CWnd::OnNcCalcSize(bCalcValidRects, lpncsp);
199 CWnd::OnKillFocus(pNewWnd);
200 SendMessage(WM_NCACTIVATE,
FALSE , 0 );
205 CWnd::OnSetFocus(pOldWnd);
206 SendMessage(WM_NCACTIVATE,
TRUE , 0 );
218 Z_MouseUp (point.x, rctZ.bottom - 1 - point.y, nFlags);
219 if (! (nFlags & (MK_LBUTTON|MK_RBUTTON|MK_MBUTTON)))
227 Z_MouseUp (point.x, rctZ.bottom - 1 - point.y, nFlags);
228 if (! (nFlags & (MK_LBUTTON|MK_RBUTTON|MK_MBUTTON)))
236 Z_MouseUp (point.x, rctZ.bottom - 1 - point.y, nFlags);
237 if (! (nFlags & (MK_LBUTTON|MK_RBUTTON|MK_MBUTTON)))
245 HINSTANCE hInstance = AfxGetInstanceHandle();
246 if (::GetClassInfo(hInstance, Z_WINDOW_CLASS, &wc) ==
FALSE)
249 memset (&wc, 0,
sizeof(wc));
250 wc.style = CS_NOCLOSE;
251 wc.lpszClassName = Z_WINDOW_CLASS;
252 wc.hCursor = LoadCursor (
NULL,IDC_ARROW);
253 wc.lpfnWndProc = ::DefWindowProc;
254 if (AfxRegisterClass(&wc) ==
FALSE)
255 Error (
"CZWnd RegisterClass: failed");
258 cs.lpszClass = Z_WINDOW_CLASS;
260 if (cs.style != QE3_CHILDSTYLE)
261 cs.style = QE3_SPLITTER_STYLE;
263 return CWnd::PreCreateWindow(cs);
CMainFrame * g_pParentWnd
void SetStatusText(int nPane, const char *pText)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point)
CONST PIXELFORMATDESCRIPTOR UINT
afx_msg void OnSetFocus(CWnd *pOldWnd)
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR *lpncsp)
void Error(const char *pFormat,...)
IMPLEMENT_DYNCREATE(CZWnd, CWnd)
afx_msg void OnMButtonDown(UINT nFlags, CPoint point)
void HandleKey(UINT nChar, UINT nRepCnt, UINT nFlags, bool bDown=true)
afx_msg void OnRButtonUp(UINT nFlags, CPoint point)
virtual void Printf(const char *fmt,...) id_attribute((format(printf
afx_msg void OnMouseMove(UINT nFlags, CPoint point)
virtual BOOL PreCreateWindow(CREATESTRUCT &cs)
afx_msg void OnMButtonUp(UINT nFlags, CPoint point)
afx_msg void OnSize(UINT nType, int cx, int cy)
afx_msg void OnLButtonUp(UINT nFlags, CPoint point)
afx_msg void OnRButtonDown(UINT nFlags, CPoint point)
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
#define EDITOR_WINDOWTEXT
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnKillFocus(CWnd *pNewWnd)
afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR *lpMMI)