cosi?
Codice PHP:BOOL CALLBACK unaDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if(uMsg==WM_CLOSE)
{
EndDialog(hwndDlg, 0);
return TRUE;
}
else if(uMsg==WM_COMMAND)
{
WORD wNotifica = HIWORD(wParam);
WORD wId = LOWORD(wParam);
if(wNotifica == STN_CLICKED && wId == 101)
{
int buff[10];
int pTesto;
pTesto = 0;
SendMessage(hwndDlg, WM_GETTEXT, 10, buff[0]);
int pTesto = GetDlgItemInt(hwndDlg, 101, 0, FALSE);
if(buff[0]>=0&&pTesto<100)
{
pTesto++;
int pTesto = SetDlgItemInt(hwndDlg, 101, 0, FALSE);
SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)pTesto);
}
else if (pTesto==100)
{
pTesto=000;
int pTesto = SetDlgItemInt(hwndDlg, 101, 0, FALSE);
SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)pTesto);
}
else if(pTesto>100)
{
EndDialog(hwndDlg, 0);
}
return TRUE;
}
}
return FALSE;
}

Rispondi quotando