Monday, November 7, 2011

Windows Programming in C language

Windows programming in C language. You ever have considered windows programming in C. If not then, try this simple functions and use them with in your program body, for better looks.
 void win(int x1,int y1,int x2,int y2)
 {
int i,temp;;
if(x1<=0)
{
x1=1;
}
if(y1<=0)
{
y1=1;
}
if(x1>x2)
{
temp=x2;
x2=x1;
x1=temp;
}
if(x1>x2)
{
temp=y2;
y2=y1;
y1=temp;
}
gotoxy(x1,y1);
cprintf("É");
for(i=x1+1;i<=x2;i++)
{
cprintf("Í");
}
cprintf("»");
gotoxy(x1,y2);
cprintf("È");
for(i=x1+1;i<=x2;i++)
{
cprintf("Í");
}
cprintf("¼");
gotoxy(x1,y1+1);
for(i=y1+1;i<=y2;i++)
{
cprintf("º");
gotoxy(x1,i);
}
gotoxy(x2+1,y1+1);
for(i=y1+1;i<=y2;i++)
{
cprintf("º");
gotoxy(x2+1,i);
}

 }
 void my_button(int xpos,int ypos,char arr[])
 {
gotoxy(xpos,ypos);
cprintf("® ");
printf("%s",arr);
cprintf(" ¯");
 }

0 comments:

Post a Comment

You are most welcome for making comments here. I will consider your view and will reply you soon.