C/Visual C - Crear controles a partir de un static

 
Vista:

Crear controles a partir de un static

Publicado por Fernando (1 intervención) el 04/04/2005 16:57:02
Hola a todos: Estoy creando un control propio a partir de un static.
El problema que tengo es que no puedo manejar algunos mensajes, como Create(), OnSize(), étc
Estoy trabajando con VC++ 6.0 en Windows, con MFC.

El código es el siguiente:

class CGrilla : public CWnd
{

public:
//Constructores, destructores y demás
CGrilla( unsigned int uCantColumnas = 1, unsigned int uCantFilas = 1 );
inline virtual ~CGrilla();

// Métodos
unsigned int& CantFilas();
unsigned int& CantColumnas();

// Attributes
protected:
CRect m_rect;
unsigned m_uColumnaInicial;
unsigned m_uFilaInicial;
unsigned int m_uCantFilas;
unsigned int m_uCantColumnas;

// Sobre-escritos
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGrilla)
public:
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL); ///No pasa por esta función
virtual BOOL OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult); ///No pasa por esta función
protected:
virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); ///No pasa por esta función
virtual void CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType = adjustBorder); ///No pasa por esta función
//}}AFX_VIRTUAL

// Generated message map functions
protected:
bool m_bManejarMouse;
//{{AFX_MSG(CGrilla)
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);///No pasa por esta función
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnAction(WPARAM wparam, LPARAM lparam);
afx_msg void OnKillFocus(CWnd* pNewWnd);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder