我写了一个类
想通过指针数组分别实例化8个
可是我发现实例化后的对象都不能用
subThread* proThread[4];
这是我写的一个线程的类 实例化后
proThread[1]->
后面的功能都不能用了
谁能给个说法么?
想通过指针数组分别实例化8个
可是我发现实例化后的对象都不能用
subThread* proThread[4];
这是我写的一个线程的类 实例化后
proThread[1]->
后面的功能都不能用了
谁能给个说法么?
解决方案 »
- 如何用RegisterDeviceNotification注册监控网络?
- CDib类只能打开真彩色的BMP图像,问题出在哪?
- 老话:如何进行时间运算
- 如何使用WM_CTLCOLORBTN?
- 提问DirectSound播放问题,
- 怎么阅读程序的代码?
- 初学者,请教
- 小弟做个浏览器,mdi 模式的.现在的问题是如何知道我点击的是那个链接?应该相应那个事件?
- 如何获得输入法所输入的文字,好象CEdit一样?谢谢大家,并祝新春快乐。
- 我怎么样通过一个控件的ID来决定它enabled和disabled?
- IWebBrowser2中怎么获得页面的标题?我用get_LocationName发现 有些情况下得到的不是标题,而有些情况是,这是为什么?
- 一个最简单windows应用程序,将会产生几个消息??
#include "NewThread.h"
#include "subThread.h"
#include "NewThreadDlg.h"#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif/////////////////////////////////////////////////////////////////////////////
// subThreadIMPLEMENT_DYNCREATE(subThread, CWinThread)subThread::subThread()
{
}subThread::~subThread()
{
}BOOL subThread::InitInstance()
{
// TODO: perform and per-thread initialization here
AfxMessageBox("Hello!");
return TRUE;
}int subThread::ExitInstance()
{
// TODO: perform any per-thread cleanup here
return CWinThread::ExitInstance();
}BEGIN_MESSAGE_MAP(subThread, CWinThread)
//{{AFX_MSG_MAP(subThread)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////
// subThread message handlersint subThread::Run()
{
// TODO: Add your specialized code here and/or call the base class
AfxMessageBox("Good!");
return CWinThread::Run();
}这是一个线程类
我在Dialog中创建了subThread* proThread[4];
如果我不是创建的线程数组就可以正确的调用
可以创建了数组就不行了
这是创建UI线程