xiancheng.cpp
来自「主要传递文档类指针」· C++ 代码 · 共 71 行
CPP
71 行
// Xiancheng.cpp : 实现文件
//
#include "stdafx.h"
#include "test1.h"
#include "Xiancheng.h"
#include ".\xiancheng.h"
// CXiancheng
IMPLEMENT_DYNAMIC(CXiancheng, CWnd)
CXiancheng::CXiancheng()
{
}
CXiancheng::~CXiancheng()
{
}
BEGIN_MESSAGE_MAP(CXiancheng, CWnd)
END_MESSAGE_MAP()
// CXiancheng 消息处理程序
//UINT CXiancheng::myProc (LPVOID pParam)
//{
// Ctest1Doc* m_pDoc=(Ctest1Doc*)pParam;
// //gy m=m_pDoc->e;
// //CXiancheng my;
// //my->a=4;
// //int f=my->a;
// //CString str;
// //str.Format("%d",f);
// //AfxMessageBox(str);
//
// return 0;
//}
//
//
//void CXiancheng::StartMonitor(Ctest1Doc* pDoc)
//{
// m_pDoc=pDoc;
//
// AfxBeginThread(myProc,m_pDoc);
//}
UINT myProc (LPVOID pParam)
{
CXiancheng* my=(CXiancheng*) pParam;
//gy m=m_pDoc->e;
for(int i=0;i<5;i++)
{
my->a[i]=i+1;
int f=my->a[i];
CString str;
str.Format("%d",f);
AfxMessageBox(str);
}
return 0;
}
void CXiancheng::StartMonitor()
{
AfxBeginThread(myProc,this);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?