Bonjour à tous !
Voila j'ai une classe derivant de Cedit et une fonction qui lui attache un spinCtrl de ce style :Alors le spins'affiche correctement mais quand je clic sur les flèches, rien ne se passe (les valeurs dans le CEdit reste les même). J'ai du zapper un truc tout bête mais je reste bloqué.
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 void CMyEdit::AttachSpinCtrl(DWORD dwStyle) { if(!m_bSpin) { CRect rect; GetWindowRect(&rect); rect.left=(rect.right-30); pSpinCtrl=new CSpinButtonCtrl; if((dwStyle & UDS_SETBUDDYINT)) dwStyle-=UDS_SETBUDDYINT; pSpinCtrl->Create(dwStyle| WS_VISIBLE | WS_BORDER | WS_CHILD , rect,GetParent(),GetDlgCtrlID()+10000); pSpinCtrl->SetWindowPos(this,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); } m_pSpinCtrl=pSpinCtrl; m_pSpinCtrl->SetRange(-180,180); m_pSpinCtrl->SetBuddy(this); m_pSpinCtrl->SetPos(180); }
Merci pour votre aide.
Partager