void main (){

int gdriver=0,gmode,opc,opc1,opc2,opc3,opc4,opc5,opc6,opc7,opc8,opc9;
float Periodos,Tasa;

initgraph(&gdriver,&gmode," ");
mouse.Inicializar(); //Inicializa Mouse

boton(90,70,500,300,8,15,7,5);
barra_titulo(92,72,499,"Ingreso De Datos - Mac Software");
DibujeIcono(97,73,Network(),16,16);
boton(483,75,495,87,8,15,7,1);DibujeIcono(485,77,Cerrar(),9,9);
marco_grabado(100,98,490,290);
Periodos=CuadroDato(115,"Digite Numero de Periodos","");
Tasa=CuadroDato(185,"Digite Tasa de Interes","");
conv_text(125,253,"NOTA: ");
conv_text(125,268,"EL PERIODO CERO (0) ES EL MOMENTO INICIAL");
getch();
cleardevice();
printf("Periodo= %f  Tasa=%f",Periodos,Tasa);


getch();
closegraph();exit(0);restorecrtmode();system("cls");


} //FIN
Beispiel #2
0
int main() {
	{
		int unidad = 0,modo;
		mouse.Inicializar();
		initgraph (&unidad,&modo,"c:\\bc\\bgi");
		if (graphresult() != 0) {
			cout << "Error al tratar de pasar al modo grafico\n";
			getch();
			return 1;
		}
		mouse.Mostrar();
		setcolor(BLUE);
		Ventana ObjetoV1 (10,20,250,170,0, 0);
		ObjetoV1.DibujarVentana();
		Ventana *ObjetoV2 = new Ventana(40,50,280,200,1,1);
		ObjetoV2->DibujarVentana();
		mouse.LibBotones();
		ObjetoV2->Interactuar();
		delete ObjetoV2;
		mouse.LibBotones();
		ObjetoV1.Interactuar();
	}
	closegraph();
	return 0;
}
Beispiel #3
0
int main() {
	int unidad = DETECT, modo,i,Vert,Horiz,Boton;
	MOUSE mouse;
	void uno(MOUSE &),dos(MOUSE &);
	void tres(MOUSE &),cuatro(MOUSE &),cinco(MOUSE &);
	void EscribirMenu(MOUSE &);

	mouse.Inicializar();

	initgraph (&unidad,&modo,"c:\\bc\\bgi");
	if (graphresult() != 0) {
		cout << "Error al tratar de pasar al modo grafico\n";
		getch();
		return 1;
	}
	mouse.Mostrar();
		
		EscribirMenu(mouse);
		Boton = 0;
		while (Boton != DERECHO) {
			Boton = mouse.Estado(&Vert, &Horiz);
			if (Boton == IZQUIERDO) {
					if (Horiz >= 50 && Horiz <= 59) {
						uno(mouse);
						EscribirMenu(mouse);
					}
					else if (Horiz >= 60 && Horiz <= 69) {
						dos(mouse);
						EscribirMenu(mouse);
					}
					else if (Horiz >= 70 && Horiz <= 79) {
						tres(mouse);
						EscribirMenu(mouse);
					}
					else if (Horiz >= 80 && Horiz <= 89) {
						cuatro(mouse);
						EscribirMenu(mouse);
					}
					else if (Horiz >= 90 && Horiz <= 99) {
						cinco(mouse);
						EscribirMenu(mouse);
					}
				mouse.LibBotones();
			}
		}

	closegraph();
	return 0;
}
Beispiel #4
0
int main()
{
	int unidad = DETECT, modo,boton,Horiz,Vert;
	char a[10],todo[30];
	MOUSE mouse;
	mouse.Inicializar();

	initgraph (&unidad,&modo,"c:\\bc\\bgi");
	if (graphresult() != 0) {
		cout << "Error al tratar de pasar al modo grafico\n";
		getch();
		return 1;
	}
	mouse.Mostrar();
	getch();

	boton = mouse.Estado (&Vert,&Horiz);
	itoa (Horiz,a,10);
	strcpy (todo,a);
	itoa (Vert,a,10);
	strcat (todo," ");
	strcat (todo,a);
	itoa (boton,a,10);
	strcat (todo," ");
	strcat (todo,a);
	mouse.Esconder();
	outtextxy (0,0,todo);
	mouse.Mostrar();

	getch();

	boton = mouse.Estado (&Vert,&Horiz);
	itoa (Horiz,a,10);
	strcpy (todo,a);
	itoa (Vert,a,10);
	strcat (todo," ");
	strcat (todo,a);
	itoa (boton,a,10);
	strcat (todo," ");
	strcat (todo,a);
	mouse.Esconder();
	outtextxy (0,10,todo);
	mouse.Mostrar();

	getch();

	boton = mouse.Estado (&Vert,&Horiz);
	itoa (Horiz,a,10);
	strcpy (todo,a);
	itoa (Vert,a,10);
	strcat (todo," ");
	strcat (todo,a);
	itoa (boton,a,10);
	strcat (todo," ");
	strcat (todo,a);
	mouse.Esconder();
	outtextxy (0,20,todo);
	mouse.Mostrar();
	getch();

	closegraph();
	return 0;
}