Bonjour,
je dispose de 2 classes héritant de CDialog. Elles sont pratiquement identiques sauf leur boîte de dialogue. Peut-on faire un héritage intermédiaire? Sinon, quelle meilleure architecture à adopter?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
class CMyDial : public CDialog
{
  enum { IDD = IDD_MyDial};
  void set();
  void setTracker();
  void setDisplay();
{{AFX_VIRTUAL(CMyDial )
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnPaint();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnMove(int x, int y);*/
	//}}AFX_VIRTUAL
}
 
class CMyDial1 : public CDialog
{
  enum { IDD = IDD_MyDial1};
  void set();
  void setTracker();
  void setDisplay();
 
{{AFX_VIRTUAL(CMyDial )
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnPaint();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnMove(int x, int y);*/
	//}}AFX_VIRTUAL
}

Merci