Código:
void __fastcall TForm1::Edit1KeyPress(TObject *Sender, char &Key)
{
if(Key < '0' || Key > '9') Key = 0;
if(!strncmp(Edit1->Text.c_str(), "044", 3) || !strncmp(Edit1->Text.c_str(), "045", 3))
Edit1->MaxLength = 13;
else
Edit1->MaxLength = 10;
}
Saludos.