DlgTest.cpp 924 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // DlgTest.cpp: 实现文件
  2. //
  3. #include "pch.h"
  4. #include "DMS.h"
  5. #include "DlgTest.h"
  6. #include "afxdialogex.h"
  7. #include "CImageStatic.h"
  8. #include "LABEL.H"
  9. // DlgTest 对话框
  10. IMPLEMENT_DYNAMIC(DlgTest, CDialogEx)
  11. DlgTest::DlgTest(CWnd* pParent /*=nullptr*/)
  12. : CDialogEx(IDD_DLG_TEST, pParent)
  13. {
  14. }
  15. DlgTest::~DlgTest()
  16. {
  17. }
  18. void DlgTest::DoDataExchange(CDataExchange* pDX)
  19. {
  20. CDialogEx::DoDataExchange(pDX);
  21. DDX_Control(pDX, IDC_PIC_TEST, m_ImageStatic);
  22. DDX_Control(pDX, IDC_STATIC_TEST, m_Label_Test);
  23. }
  24. BEGIN_MESSAGE_MAP(DlgTest, CDialogEx)
  25. ON_BN_CLICKED(IDOK, &DlgTest::OnBnClickedOk)
  26. END_MESSAGE_MAP()
  27. // DlgTest 消息处理程序
  28. BOOL DlgTest::OnInitDialog()
  29. {
  30. CDialogEx::OnInitDialog();
  31. m_ImageStatic.SetImage(_T("shoutao.png"));
  32. m_Label_Test.SetWindowText("test");
  33. return TRUE;
  34. }
  35. void DlgTest::OnBnClickedOk()
  36. {
  37. // TODO: 在此添加控件通知处理程序代码
  38. CDialogEx::OnOK();
  39. }