stortoll -...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 http://www.sourcecodesworld.com/source/show.asp?ScriptID=1125 //////// FILE 1 - STORETOLL.C ///////////////// //////// LOOK BELOW FOR THE DATABASE FILE ///// #include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> #include<time.h> #include<stdlib.h> #define NO 0 #define YES 1 #define NONE -1 //in a menu there can be three items #define MAX_MENU 6 int x,y int selection int button,x,y void *p size_t area int validate(int) FILE *date FILE *f2 FILE *fop FILE *today char todaydate[15] FILE *day char salebydate[10] FILE *itemtoday FILE *itembydate char str[10] int customer struct MENU { int x
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 int y int x1 int y1 unsigned char Active[MAX_MENU] char *head } int mouseon(struct MENU *t) void process() void xorbar(int sx,int sy,int ex,int ey,int c) void show() void hide() void status() //position of the billprocess menu struct MENU Billprocess = {0,0,80,20} //position of the print menu struct MENU Print = {90,0,165,20} struct MENU Management = {175,0,260,20} void main() { int gd=DETECT,gm selection=NONE for(gd=0 gd<MAX_MENU gd++) { //gd=3 Billprocess.Active[gd]=YES //gd=1 Print.Active[gd]=YES Management.Active[gd]=YES } //head that is printed on msg Billprocess.head="processbill" Print.head="Print" Management.head="management" //allocation for image memory area=imagesize(0,0,150,150)
Background image of page 2
Sheet1 Page 3 p=malloc(area) if(p==NULL) { closegraph() restorecrtmode() printf("not enough memory") exit(1) } //style of the menu setfillstyle(1,7) //full window bar(0,0,660,650) welcomescreen() x=2 y=2 process() //end() closegraph() getch() } void process() { //menu items in billprocess menu char *bp[]={"Processbill","Openbill","Exit"} //menu item in print menu char *pr[]={"Printbill"} char *mgt[]={"SalesToday","SalesBydate","Itemsoldtoday","Itemsoldbydate"} char KEY //menu bar position win(0,0,660,20) //drawing button for menu items drawbtn(&Billprocess,"Billprocess")
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 4 settextstyle(0,0,0) //outtextxy(close(x+y),close(y+7),"x") show() //instantly menus are idle Billprocess.Active[3]=NO Print.Active[1]=NO Management.Active[4]=NO while(1) { if(kbhit()) { KEY=getch() //way to exit press esc or - if(KEY==27 || KEY==45) break } status() if(button==1) { //break { if(selection==NONE) msg("no selection") if(selection==0) { char str[3]
Background image of page 4
Sheet1 Page 5 struct dosdate_t d
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/06/2010 for the course UBIT 411 taught by Professor Saleemelahi during the Spring '10 term at University of Karachi.

Page1 / 21

stortoll -...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online