1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
if(GetAsyncKeyState(VK_OEM_PLUS)&1){
Count += 1;
if(FindWindow(NULL,"MyProgram")){
char buffer [33];
char str1[20];
strcpy (str1,"MyProgram ");
_itoa_s(MineCount,buffer,10);
strncat (str1, buffer,2);
strncat (str1, " - Count",8);
HWND hWnd=FindWindow(NULL,"MyProgram");
SetWindowText(hWnd,str1);}
else{
char buffer2 [33];
char buffer3 [33];
char str1[20];
char str2[20];
strcpy (str1,"MyProgram ");
strcpy (str2,"MyProgram ");
_itoa_s(MineCount-1,buffer2,10);
strncat (str1, buffer2, 2);
strncat (str1, " - Count",8);
HWND hWnd=FindWindow(NULL,str1);
_itoa_s(MineCount,buffer3,10);
strncat (str2, buffer3,2);
strncat (str2, " - Count",8);
SetWindowText(hWnd,str2);
}
}
|