我有这样的代码: //Class1.h - this is in a DLL solution
class Sample
{
//members...
}
static Sample m_sample[1]; //size is not known - it will be given by the application that references the DLL
我们遇到了临时句柄的问题。 当我在这里读到:What is the lifetime of a CWnd obtained from CWnd::FromHandle? CWnd::FromHandle()将创建一个临时句柄。我们的计划是存储手柄供以后使用,但这不起作用。 我们也试过CWnd::FromHandlePermanent(),但是这不知何故返回一个空指针。 而且mpWnd->Attac