summaryrefslogtreecommitdiffabout
path: root/T42Dlg.h
Unidiff
Diffstat (limited to 'T42Dlg.h') (more/less context) (ignore whitespace changes)
-rw-r--r--T42Dlg.h159
1 files changed, 159 insertions, 0 deletions
diff --git a/T42Dlg.h b/T42Dlg.h
new file mode 100644
index 0000000..5f0b6d4
--- a/dev/null
+++ b/T42Dlg.h
@@ -0,0 +1,159 @@
1// T42Dlg.h : header file
2//
3
4/////////////////////////////////////////////////////////////////////////////
5// CT42Dlg dialog
6
7class CTTable : public CObject {
8public:
9 TalkCtlMessagem_RQ;
10 CTimem_Time;
11
12 CTTable() {}
13 CTTable(CTTable& src) { Copy(src); }
14
15 void Copy(CTTable& src) {
16 memmove(&m_RQ,&src.m_RQ,sizeof(m_RQ));
17 m_Time = src.m_Time;
18 }
19
20 CTTable& operator=(CTTable& src) {
21 Copy(src);
22 return *this;
23 }
24
25 BOOL operator==(TalkCtlMessage& m) {
26 return (
27 strcmp(m_RQ.m_LName,m.m_LName)==0
28 && strcmp(m_RQ.m_RName,m.m_RName)==0
29 && m_RQ.m_Type == m.m_Type
30 && m_RQ.m_PID == m.m_PID
31 );
32 }
33
34 BOOL Match(TalkCtlMessage& m) {
35 return (
36 strcmp(m_RQ.m_LName,m.m_RName)==0
37 && strcmp(m_RQ.m_RName,m.m_LName)==0
38 && m_RQ.m_Type == talkCtlReqLeaveInvite
39 );
40 }
41};
42
43 typedefCList<CTTable,CTTable&> CTRestaurant;
44
45class CT42Dlg : public CDialog
46{
47// Construction
48public:
49 ~CT42Dlg();
50 void SaveSettings();
51 void LoadSettings();
52 UINT GetOnCtl(CComboBox& ctl);
53 void SetOnCtl(UINT nAction,CComboBox& ctl);
54 UINT m_onCall;
55 UINT m_onCallAway;
56 BOOL m_bAway;
57 CSize m_sizeMin;
58 UINT m_gapY;
59 UINT m_marginY;
60 UINT m_marginX;
61 void RecalcLayout();
62 void SetTheIcon(HICON hIcon);
63 UINT m_newCalls;
64 HICON m_hIconEmpty;
65 HICON m_hIconFull;
66 HWND m_hExFW;
67 int m_iProcessed;
68 int m_iNew;
69 CImageList m_Images;
70 static DWORD CALLBACK ESOUTProc(DWORD dwCookie,LPBYTE pbBuff,LONG cb,LONG FAR *pcb);
71 void SetColumnWidths();
72 void OnDelT42Call();
73 void OnAddT42Call();
74 enum{
75 subitemTime=0,
76 subitemCaller, subitemCallee, subitemDuration,
77 subitemTTY
78 };
79 void InitCalls();
80 BOOL m_bShown;
81 BOOL m_bExiting;
82 void ToggleVisibility();
83 BITMAP m_bitmapBack;
84 CBitmap m_bmpBack;
85 DWORD m_trackTalkID;
86 CTimeSpan m_talkLifetime;
87 CTRestaurant m_talks;
88 CTRestaurant m_announcements;
89 SOCKET m_daemonSocket;
90 CT42Dlg(CWnd* pParent = NULL);// standard constructor
91
92// Dialog Data
93 //{{AFX_DATA(CT42Dlg)
94 enum { IDD = IDD_T42_DIALOG };
95 CButtonm_ExitCtl;
96 CButtonm_TeaCtl;
97 CButtonm_AwayCtl;
98 CButtonm_HelpCtl;
99 CButtonm_OptionsCtl;
100 CComboBoxm_OnCallAwayCtl;
101 CComboBoxm_OnCallCtl;
102 CListCtrlm_CallsCtl;
103 CRichEditCtrl m_PreviewCtl;
104 //}}AFX_DATA
105
106 // ClassWizard generated virtual function overrides
107 //{{AFX_VIRTUAL(CT42Dlg)
108 protected:
109 virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support
110 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
111 //}}AFX_VIRTUAL
112
113// Implementation
114protected:
115 HICON m_hIcon;
116
117 // Generated message map functions
118 //{{AFX_MSG(CT42Dlg)
119 virtual BOOL OnInitDialog();
120 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
121 afx_msg void OnDestroy();
122 afx_msg void OnPaint();
123 afx_msg HCURSOR OnQueryDragIcon();
124 afx_msg void OnTalk();
125 afx_msg LRESULT OnDaemon(WPARAM,LPARAM);
126 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
127 afx_msg LRESULT OnTrayIcon(WPARAM,LPARAM);
128 virtual void OnCancel();
129 afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
130 virtual void OnOK();
131 afx_msg void OnTrayExit();
132 afx_msg void OnTrayOptions();
133 afx_msg void OnTrayShowmainwindow();
134 afx_msg void OnTrayT42();
135 afx_msg void OnOptions();
136 afx_msg void OnGetdispinfoCalls(NMHDR* pNMHDR, LRESULT* pResult);
137 afx_msg void OnItemchangedCalls(NMHDR* pNMHDR, LRESULT* pResult);
138 afx_msg void OnRclickCalls(NMHDR* pNMHDR, LRESULT* pResult);
139 afx_msg void OnCalllogCallback();
140 afx_msg void OnCalllogDelete();
141 afx_msg void OnCalllogSavetofile();
142 afx_msg void OnCalllogEmptylog();
143 afx_msg void OnDeleteitemCalls(NMHDR* pNMHDR, LRESULT* pResult);
144 afx_msg LRESULT OnUpdatePreview(WPARAM,LPARAM);
145 afx_msg void OnKeydownCalls(NMHDR* pNMHDR, LRESULT* pResult);
146 afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
147 afx_msg void OnCalllogMarkasnew();
148 afx_msg void OnCalllogMarkasprocessed();
149 afx_msg void OnSize(UINT nType, int cx, int cy);
150 afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
151 afx_msg void OnAway();
152 afx_msg void OnSelendokOncall();
153 afx_msg void OnSelendokOncallaway();
154 afx_msg void OnTrayAway();
155 afx_msg void OnTimer(UINT nIDEvent);
156 afx_msg BOOL OnQueryEndSession();
157 //}}AFX_MSG
158 DECLARE_MESSAGE_MAP()
159};