HWND CreateWindow( LPCTSTR lpClassName,
LPCTSTR lpWindowName,
DWORD dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam
);hWndParent就用你传到DLL的句柄
LPCTSTR lpWindowName,
DWORD dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam
);hWndParent就用你传到DLL的句柄
用fromhandle。
用fromhandle。
麻烦你,可以说的具体点吗?谢谢了
用fromhandle。
麻烦你,可以说的具体点吗?谢谢了
在DLL中,用fromhandle将handle化为Cwnd对象,
让后再CreateWindow.
用fromhandle。
麻烦你,可以说的具体点吗?谢谢了
在DLL中,用fromhandle将handle化为Cwnd对象,
让后再CreateWindow.
用fromhandle将handle化为Cwnd对象,因为不在一个线程中转化的Cwnd对象应该是临时的吧,我之前试过还是不成功啊 断点断在CMFCDragFrameImpl::Init(CWnd* pDraggedWnd) 中的 ENSURE(m_pDockManager != NULL)
我的转化代码
ASSERT(::IsWindow(m_hParentWnd));
CWnd* CWndprwant1 = CWnd::FromHandle(m_hParentWnd);
CFrameWndEx* CWndpreant = (CFrameWndEx*)CWndpreant1;
这样转化对吗?
用fromhandle。
麻烦你,可以说的具体点吗?谢谢了
在DLL中,用fromhandle将handle化为Cwnd对象,
让后再CreateWindow.
pParentWnd->Create(...);//创建属性页
用fromhandle。
麻烦你,可以说的具体点吗?谢谢了
在DLL中,用fromhandle将handle化为Cwnd对象,
让后再CreateWindow.
pParentWnd->Create(...);//创建属性页我就是这么创建的啊,但是还是出现断言 断言断在
void CMFCDragFrameImpl::Init(CWdn* pDraggedWnd)中的ENSURE(m_pDockManager != NULL);处
用fromhandle。
麻烦你,可以说的具体点吗?谢谢了
在DLL中,用fromhandle将handle化为Cwnd对象,
让后再CreateWindow.
pParentWnd->Create(...);//创建属性页我就是这么创建的啊,但是还是出现断言 断言断在
void CMFCDragFrameImpl::Init(CWdn* pDraggedWnd)中的ENSURE(m_pDockManager != NULL);处
我就是这么创建的啊
你就是这么创建的啊???!!!
用fromhandle。
麻烦你,可以说的具体点吗?谢谢了
在DLL中,用fromhandle将handle化为Cwnd对象,
让后再CreateWindow.
pParentWnd->Create(...);//创建属性页我就是这么创建的啊,但是还是出现断言 断言断在
void CMFCDragFrameImpl::Init(CWdn* pDraggedWnd)中的ENSURE(m_pDockManager != NULL);处
我就是这么创建的啊
你就是这么创建的啊???!!!那究竟是什么原因啊,
void CDrawFlowChartView::showDock_pane()
{
m_pWndProperties = new CPropertiesWnd();
if(!CreateDockingWindows())
{
TRACEO("未能创建停靠窗口");
return;
}
m_pWndProperties->EnableDocking(CBRS_ALIGN_ANY);
m_pWndProperties->ShowPane(TURE,TURE,TURE);
}
BOOL CDrawFlowChartView::CreateDockingWindows()
{
BOOL bNameValid;
CString strPropertiesWnd;
bNameValid = strPropertiesWnd.LoadString(IDS_PROPERTIES_WND);
ASSERT(bNameValid);
ASSERT(::IsWindow(m_hParentWnd));
CWnd* CWndprwant1 = CWnd::FromHandle(m_hParentWnd);
CFrameWndEx* CWndpreant = (CFrameWndEx*)CWndpreant1;
if(!m_pWndProperties->Create(strPropertiesWnd,CWndpreant ,CRect(0,0,200,200),TRUE,ID_VIEW_PROPERIESWNDVV,WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN))
{
TRACEO("未能创建“属性”窗口\n")
return TRUE;
}
}