On peut aussi se passer de strcat et strcpy comme ceci:
char buffer[6], *c = buffer;
char result[6], *d = result;
int h1, m1, h2, m2;
GetWindowText(textbox1, buffer, sizeof(buffer));
while(*c != ':') c++; *c++ = 0;
h1 = atoi(buffer); m1 = atoi(c);
c = buffer;
GetWindowText(textbox2, buffer, sizeof(buffer));
while(*c != ':') c++; *c++ = 0;
h2 = atoi(buffer); m2 = atoi(c);
if(h2 < h1) h2 = 24+h2;
if(m2 < m1) { h2--; m2 = 60+m2; }
itoa(h2-h1, buffer, 10); c = buffer;
*d++ = *c++;
if(*c) *d++ = *c;
*d++ = ':';
itoa(m2-m1, buffer, 10); c = buffer;
*d++ = *c++;
if(*c) *d++ = *c;
*d = 0;
SetWindowText(label, result);
C++ (@++)