databaseserverview.h
来自「本程序提供了winCE访问pc机sqlserver中间键的解决方案和源码 」· C头文件 代码 · 共 109 行
H
109 行
// DatabaseServerView.h : interface of the CDatabaseServerView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_DATABASESERVERVIEW_H__E15D19D3_E09E_49E0_84BA_C90EB6883DFC__INCLUDED_)
#define AFX_DATABASESERVERVIEW_H__E15D19D3_E09E_49E0_84BA_C90EB6883DFC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "RecordDlg.h"
#include "IocpModeSvr.h"
#include "Markup.h"
class CDatabaseServerView : public CFormView
{
protected: // create from serialization only
CDatabaseServerView();
DECLARE_DYNCREATE(CDatabaseServerView)
public:
//{{AFX_DATA(CDatabaseServerView)
enum { IDD = IDD_DATABASESERVER_FORM };
CEdit m_ctrlEditServerLog;
CListCtrl m_ctrlListData;
//}}AFX_DATA
// Attributes
public:
CDatabaseServerDoc* GetDocument();
// Operations
public:
//回调函数
static void OnDataArrive(unsigned long sIP, SOCKET sClient, char * pData, unsigned long DataLength,DWORD userdata);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDatabaseServerView)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CDatabaseServerView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CDatabaseServerView)
afx_msg void OnAddRecord();
afx_msg void OnClickListData(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDeleteRecord();
afx_msg void OnModifyRecord();
afx_msg void OnDestroy();
afx_msg void OnStartServer();
afx_msg LONG OnDataArrivedMsg(WPARAM wParam,LPARAM lParam);
//}}AFX_MSG
afx_msg void OnUpdateIndicatorCoord(CCmdUI* pCmdUI);
DECLARE_MESSAGE_MAP()
private:
int m_nSelected;
void RefreshList();
void InitDatabase();
void AddMessage(LPCTSTR msg);
CString m_strLocalIP; //本机计算机IP
CString m_strLocalName; //本机计算机名
int GetIpAddress(const CString &sHostName,CString &sIpAddress); //获取本机IP
int GetLocalHostName(CString &sHostName); //获取本机计算机名
//服务器
CIocpModeSvr* m_pServer;
BOOL m_bServerStarted;
void SendBack();
};
#ifndef _DEBUG // debug version in DatabaseServerView.cpp
inline CDatabaseServerDoc* CDatabaseServerView::GetDocument()
{ return (CDatabaseServerDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DATABASESERVERVIEW_H__E15D19D3_E09E_49E0_84BA_C90EB6883DFC__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?