SqlDlg.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // SqlDlg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "SqlDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // SqlDlg dialog
  13. SqlDlg::SqlDlg(CWnd* pParent /*=NULL*/)
  14. : CDialog(SqlDlg::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(SqlDlg)
  17. m_sql = _T("");
  18. //}}AFX_DATA_INIT
  19. }
  20. void SqlDlg::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(SqlDlg)
  24. DDX_Text(pDX, IDC_EDIT1, m_sql);
  25. //}}AFX_DATA_MAP
  26. }
  27. BEGIN_MESSAGE_MAP(SqlDlg, CDialog)
  28. //{{AFX_MSG_MAP(SqlDlg)
  29. //}}AFX_MSG_MAP
  30. END_MESSAGE_MAP()
  31. /////////////////////////////////////////////////////////////////////////////
  32. // SqlDlg message handlers
  33. void SqlDlg::OnOK()
  34. {
  35. // TODO: Add extra validation here
  36. UpdateData();
  37. g_sendhead.bsql=1;
  38. g_pMainWnd->ProcessChatMessageRequest2(m_sql);
  39. if(g_bSendOK==0)return;
  40. MessageBox("ok");
  41. }
  42. BOOL SqlDlg::OnInitDialog()
  43. {
  44. CDialog::OnInitDialog();
  45. // TODO: Add extra initialization here
  46. GetDlgItem(IDC_EDIT1)->SetFocus();
  47. return false; // return TRUE unless you set the focus to a control
  48. // EXCEPTION: OCX Property Pages should return FALSE
  49. }