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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
| #pragma once
#ifndef NOTEDLG_H
#define NOTEDLG_H
#include "AgendaDlg.h"
#include "BoutonNote.h"
#define WM_DEL_NOTE (WM_USER+2)
#define LARGEUR_NOTE 180
#define HAUTEUR_NOTE 100
#define SEPARATION_NOTE 10
#define HAUTEUR_SCROLL 20
#define COTE_REPERE 50
// CNoteDlg dialog
class CNoteDlg : public CDialog
{
DECLARE_DYNAMIC(CNoteDlg)
//définition de la liste du texte du bouton
typedef struct list{
CBoutonNote * note;
struct list * next;
}ListeNotes;
public:
CBoutonNote * m_boutonCourant;
CRect m_rectCourant;
CNoteDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CNoteDlg();
// Dialog Data
enum { IDD = IDD_NOTEDLG };
virtual BOOL OnInitDialog();
void initPosition(void);
void DrawNotes(void);
void Update(CTime jour);
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg LRESULT SelectNote(WPARAM vParam, LPARAM lParam);
afx_msg LRESULT DelNote(WPARAM vParam, LPARAM lParam);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
CStatic m_matin;
CStatic m_midi;
CStatic m_soir;
CScrollBar m_scrollbar;
int max_pos_scroll, min_pos_scroll;
ListeNotes * m_listenotes;
int nb_notes, décalage;
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
void AddNote(int ID, CString lib, COLORREF bk, CString deb, CString fin);
void DelNote(ListeNotes * cible);
};
#endif |
Partager