/*******************************************************************************************
得到输入,字符太长就分割(从头到500个字符内出现的最后面的标点的位置),然后下载
********************************************************************************************/
void Getlenght(HWND hwnd){
NextLine=0;
GetComboInfo(hwnd,IDC_COMBO2,S_Language);
GetComboInfo(hwnd,IDC_COMBO3,T_Language);
char input[5000]={0};
GetDlgItemTextA(hwnd, IDC_EDIT1, input, sizeof(input));
CheakInput(input);
int inputlen=strlen(input);
char NowTochange[920]={0};
bool IsCutout=false;//里面是否有特殊标点
int num_while=0;//循环次数
while(inputlen>500){
int now=500;
num_while++;
while(now>0)
{
if((input[now]=='.')||(input[now]=='?')||(input[now]=='!')||(input[now]==',')||(input[now]==';')||(input[now]=='"')||input[now]=='\''){
setString(input,now,NowTochange);
IsCutout=true;
inputlen-=now+1;
break;
}
now--;
}
if(!IsCutout){//如果没有那就直接500切断
setString(input,500,NowTochange);
inputlen-=500;
} IsCutout=false;
//开始下载
ShowT(hwnd,NowTochange);
}
//开始下载?
ShowT(hwnd,input);
}