Code: do // scroll show name and number in phone book { // all page organize gotoxy(L_P_id, 7); cprintf("id Name Number"); gotoxy(L_P_id, 8); cprintf("-- -------------------- --------------------"); for (int i=min_id, point= 9; i<= max_id; point++, i++) { if (take.contact[i].validity== true) { gotoxy(L_P_id, point); cprintf("%i",x[index].id); gotoxy(L_P_nam, point); cprintf(x[index].name); gotoxy(L_P_num, point); cprintf(x[index].number); } else i++; } textcolor(15); //red backgrand textbackground(12); // ** it show the selected case gotoxy(L_P_nam, pointer); //write highlight backgrand cprintf(" "); if (x[index].validity== true) { // since i do not remove the invisible items // i most check always i wanna show that gotoxy(L_P_nam, pointer); // means cprintf(x[index].name); // while a case gotoxy(L_P_num, pointer); // is valid cprintf(x[index].number); // show it } k= getch(); k1= char(0); if (!k) k1= getch(); textcolor(15); //color change textbackground(11); gotoxy(2, pointer); //clean list cprintf(" "); if ((k==char(0)) && (k1==char(80)))//DOWN get down pointer { index++; if (pointer >= downlimmit) { min_id++; max_id++; if (max_id> big_id) { pointer= uplimmit; min_id= small_id; index= min_id; max_id= small_id+ 14; } } else pointer++; } else if ((k==char(0)) && (k1==char(72)))//UP get up pointer { index--; if (pointer <= uplimmit) { min_id--; max_id--; if (min_id< small_id) { pointer= downlimmit; max_id= big_id; showid= max_id; min_id= big_id- 14; } } else pointer--; } else if ((k==char(13)) && (k1==char(0)))//ENTER Edit { // add all key that you like , like this ;) } else if (k==char(8) && k1== char(0)) if (areyou('e')) // 'e' means Exit validExit= true; } while (!validExit);
من انگلیسیم خوب نیست فارسی میگم ، خواهش میکنم ، قابلی نداشت my english is not well , i say in persian : your welcom , it have not your price .