00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_CTRLSCHEMA_H__98487F51_E425_4B0D_BC82_BCA8A7F5D952__INCLUDED_)
00023 #define AFX_CTRLSCHEMA_H__98487F51_E425_4B0D_BC82_BCA8A7F5D952__INCLUDED_
00024
00025 #pragma once
00026
00027 class CSchema;
00028 class CXMLElement;
00029
00030
00031 class CSchemaCtrl : public CWnd
00032 {
00033
00034 public:
00035 CSchemaCtrl();
00036 virtual ~CSchemaCtrl();
00037
00038
00039 public:
00040 int m_nCaptionWidth;
00041 int m_nItemHeight;
00042 BOOL m_bShowBorder;
00043 protected:
00044 CSchema* m_pSchema;
00045 CObArray m_pControls;
00046 CStringArray m_pCaptions;
00047 int m_nScroll;
00048 int m_nScrollWheelLines;
00049 CString strMultipleString;
00050
00051
00052 public:
00053 void SetSchema(CSchema* pSchema, BOOL bPromptOnly = FALSE);
00054 BOOL UpdateData(CXMLElement* pBase, BOOL bSaveAndValidate);
00055 void Disable();
00056 void Enable();
00057 BOOL OnTab();
00058 void ScrollBy(int nDelta);
00059 protected:
00060 void Layout();
00061 void SetFocusTo(CWnd* pCtrl);
00062
00063
00064 public:
00065
00066 public:
00067 virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
00068 protected:
00069 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00070
00071
00072
00073 protected:
00074
00075 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00076 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00077 afx_msg void OnDestroy();
00078 afx_msg void OnPaint();
00079 afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00080 afx_msg void OnSize(UINT nType, int cx, int cy);
00081 afx_msg void OnNcPaint();
00082 afx_msg void OnSetFocus(CWnd* pOldWnd);
00083 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00084 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
00085
00086 afx_msg void OnControlEdit();
00087
00088 DECLARE_MESSAGE_MAP()
00089
00090 };
00091
00092
00093
00094 #define IDC_METADATA_CONTROL 99
00095
00096 #endif // !defined(AFX_CTRLSCHEMA_H__98487F51_E425_4B0D_BC82_BCA8A7F5D952__INCLUDED_)