int v;
SendMessage (GetDlgItem (hwnd, IDC_EDIT1),EM_LIMITTEXT,(WPARAM)3,0);
SendMessage (GetDlgItem (hwnd, IDC_EDIT1),WM_GETTEXT,sizeof(text),reinterpret_cast
SendMessage (GetDlgItem (hwnd, IDC_EDIT2),WM_SETTEXT,0,(LPARAM)text);
v=atoi(text);
if (v>100)
{
v=100;
sprintf(text, "%d", v);
SendMessage (GetDlgItem (hwnd, IDC_EDIT1),WM_SETTEXT,0,(LPARAM)text);
}
Nessun commento:
Posta un commento