je tiens juste a preciser poue l'ecriture du nombre 0001
si ton nombe commence par 0, alors en C/C++ c'est un nombre octatdecimal (en base 8)
Donc tu ne pourras pas faire 0009 !
juste une precision ...












































-------------------------------
Réponse au message :
-------------------------------
> switch(msg) case BN_CLICKED: NON !!!
> case WM_COMMAND:
> switch(wParam)
> {
> case IDBUTTON: ok ici pour BN_CLICKED = 0
> BruNews, ciao...
>
>
> -------------------------------
> Réponse au message :
> -------------------------------
>
> > je souhaite, en appuyan sur un boutton, declancher un timer ki ajoute a chak seconde une unité au caption de ce meme bouton mé sa marche pa!!!
> >
> >
> > voici mon code:
> >
> > #include <windows.h>
> > #include "resource.h"
> >
> >
> >
> > HINSTANCE hinst;
> >
> > BOOL CALLBACK AppProc(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
> > {
> > switch(msg)
> > {
> >
> > case BN_CLICKED:
> > switch(wParam)
> > {
> > case IDC_BUTTON1:
> > SetTimer(hdlg,0001,1000,NULL);
> > default:;
> > }
> >
> >
> > case WM_COMMAND:
> > switch(wParam)
> > {
> > case IDCANCEL:
> > KillTimer(hdlg,0001);
> > EndDialog(hdlg, 0);
> > default :;
> >
> > }
> >
> > case WM_TIMER :
> > SetDlgItemInt(hdlg,IDC_BUTTON1,GetDlgItemInt(hdlg,IDC_BUTTON1,NULL,TRUE)+1,TRUE);
> > }
> > return 0;
> > }
> >
> > int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR, int)
> > {
> > hinst = hInstance;
> > DialogBox(hInstance, MAKEINTRESOURCE(IDD_APP1), NULL, AppProc);
> > return 0;
> > }
> >
> >
> >
> > je bosse sous VC++ sans MFC
> >
> > merci a tous
>