|
|
1.1 root 1: // chartwnd.h : Declares the class interfaces for the Chart frame window.
2: //
3: // This is a part of the Microsoft Foundation Classes C++ library.
4: // Copyright (C) 1992 Microsoft Corporation
5: // All rights reserved.
6: //
7: // This source code is only intended as a supplement to the
8: // Microsoft Foundation Classes Reference and Microsoft
9: // QuickHelp documentation provided with the library.
10: // See these sources for detailed information regarding the
11: // Microsoft Foundation Classes product.
12: //
13:
14: #ifndef __CHARTWND_H__
15: #define __CHARTWND_H__
16:
17: /////////////////////////////////////////////////////////////////////////////
18:
19: class CPrintDlgBox;
20:
21: /////////////////////////////////////////////////////////////////////////////
22: // class CChartWnd
23:
24: class CChartWnd : public CFrameWnd
25: {
26: protected:
27: short GetHighValue();
28: void SetNewColors();
29: void RenderChart(CDC*);
30: void DrawBarChart(CDC*);
31: void DrawLineChart(CDC*);
32: BOOL DoPrint();
33: void GetFileName(char*);
34: BOOL ChangeFile();
35: void PrepareDC(CDC* pDC);
36:
37: public:
38: BOOL m_bUntitled;
39: BOOL m_bChartSerializedOK;
40: short m_cxClient, m_cyClient;
41: float m_fTallest;
42: CString m_szFileName;
43: HCURSOR m_hCross, m_hArrow;
44: CPrintDlgBox* m_pPrintDlg;
45: CChartObject* m_pChartObject;
46: static CRect rectPage;
47: static CRect rectData;
48:
49: CChartWnd();
50: ~CChartWnd();
51: BOOL Create(LPCSTR szTitle, LONG style = WS_OVERLAPPEDWINDOW,
52: const RECT& rect = rectDefault,
53: CWnd* pParent = NULL);
54:
55: // See file.cpp for the file-handling (serialization) code.
56:
57: BOOL FileDlg(BOOL bOpen, int nMaxFile, LPSTR szFile);
58: int LoadFile(const char*);
59: void ReadFile();
60: void SaveFile(BOOL bNewFileName);
61:
62: void UpdateMenu();
63:
64: // message handlers
65:
66: afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
67: afx_msg void OnChange();
68: afx_msg void OnPrint();
69: afx_msg void OnBar();
70: afx_msg void OnLine();
71: afx_msg void OnPaint();
72: afx_msg void OnMouseMove(UINT nButtons, CPoint pos);
73: afx_msg void CmdFileOpen();
74: afx_msg void CmdFileSave();
75: afx_msg void CmdFileSaveAs();
76: afx_msg void OnNew();
77: afx_msg void OnClose();
78: afx_msg void OnAbout();
79:
80: DECLARE_MESSAGE_MAP()
81: };
82:
83: /////////////////////////////////////////////////////////////////////////////
84:
85: #endif // __CHARTWND_H__
86:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.