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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
// declare the class.
//
// class TCbookDlg
// ~~~~~ ~~~~~~~~~~~~
class TCbookDlg : public TDialog {
public:
TCbookDlg(TWindow* parent, TResId resId, TCbookStruct& transfer);
TEdit *Edit1,*Edit2,*Edit3,*Edit4,*Edit5,*Edit6,*Edit7,*Edit8;
TEdit *Edit9,*Edit10,*Edit11,*Edit12,*Edit13,*Edit14,*Edit15;
// WMTab is the event to process specific math calculations
// upon receiving the WM_GETDLGCODE message.
LRESULT WMTab(WPARAM, LPARAM);
// WMChar is the event to process specific programming upon
// receiving inputed keystrokes in the text box.
LRESULT WMChar(WPARAM, LPARAM);
protected:
// declare member functions of the TCbookDlg class.
void CmOk();
void Choose();
void Delete();
void Mchk();
void PrnReg();
void BalForw();
void PrnEnv();
void New();
void SVendor();
void SPaymentDate();
void SCheckNo();
void Reset();
private:
// declare objects of the TCbookDlg class.
TPrinter* Printer;
TListBox* ListBox;
TComboBox* ComboBox;
TComboBox* ComboBox2;
TComboBox* ComboBox3;
TComboBox* ComboBox4;
TComboBox* ComboBox5;
TComboBox* ComboBoxV;
TComboBox* ComboBox6;
TButtonGadget* G1;
TButtonGadget* G2;
TButtonGadgetEnabler* Ge1;
TButtonGadgetEnabler* Ge2;
void SetupWindow();
// declare the character arrays.
char Pdate[MAXDAT];
char Pnumber[MAXINVNO];
char Paid_amount[MAXSELL];
char Pdescr[MAXNOTE2];
char Paid_amount_discount[MAXSELL];
char Pnetdebit[MAXSELL];
char Pcheck[MAXSELL];
char Vendor[MAXCOMPANY2];
char ExpCode[MAXPAIDDISCOUNTSUMODE];
char TranType[MAXSELL];
char TranPaid[MAXANS];
char Void[MAXANS];
char Pcredit[MAXSELL];
char Sdt[MAXDAT];
char Edt[MAXDAT];
char BalUpdated_amount[MAXSELL];
char CutOffDate[MAXDAT];
char CheckMemo[MAXNOTE];
char Paiddate[MAXDAT];
char TranCleared[MAXANS];
char Rcount[MAXPASS];
DECLARE_RESPONSE_TABLE(TCbookDlg);
};
// connect the TCbookDlg class member functions to their corresponding
// identifiers as set in the resource file (not included here).
DEFINE_RESPONSE_TABLE1(TCbookDlg, TDialog)
EV_COMMAND(IDOK, CmOk),
EV_COMMAND(IDC_PDELETE, Delete),
EV_COMMAND(IDC_MCHECK, Mchk),
EV_COMMAND(IDC_PRNREG, PrnReg),
EV_COMMAND(IDC_BALFORW, BalForw),
EV_COMMAND(IDC_PRNENV, PrnEnv),
EV_COMMAND(IDC_CNEW, New),
EV_COMMAND(IDC_RESET, Reset),
EV_COMMAND(IDC_SVENDOR, SVendor),
EV_COMMAND(IDC_SDATE, SPaymentDate),
EV_COMMAND(IDC_SCHECKNO, SCheckNo),
EV_LBN_SELCHANGE(IDC_LISTBOX, Choose),
// WM_GETDLGCODE fires this event (WMTab) in the class TCbookDlg.
EV_MESSAGE(WM_GETDLGCODE, WMTab),
// WM_CHAR fires this event (WMChar) in the class TCbookDlg.
EV_MESSAGE(WM_CHAR, WMChar),
END_RESPONSE_TABLE;
|