Hi, David OK, thank you !
Hello all, I need win32 dll and exe main Window can communicated bidirection, my first idea is dll send message to main Window but dll can't get hWnd of the exe. My questions are: 1, how can I get the the exe's hWnd from dll? 2, Is there are any other better/common solution?
Hello All, I think I have not descript my idea clearly: I want the DLL can exports a FormView to exe's CTab. that means the CTab may use AddtabPage or other functions to add a FormView page inside it. Because I saw some code in CTab: inline void CTab::ShowActiveView(CWnd* pView) { if (pView != m_pActiveView) { // Hide the old view if (GetActiveView() && (GetActiveView()->IsWindow())) GetActiveView()->ShowWindow(SW_HIDE); // Assign the view window m_pActiveView = pView; if (m_pActiveView && *this)...
Hello All, I think I have not descript my idea clearly: I want the DLL can exports a FormView to exe's CTab. that means the CTab may use AddtabPage or other functions to add a FormView page inside it. Because I saw some code in CTab: inline void CTab::ShowActiveView(CWnd* pView) { if (pView != m_pActiveView) { // Hide the old view if (GetActiveView() && (GetActiveView()->IsWindow())) GetActiveView()->ShowWindow(SW_HIDE); // Assign the view window m_pActiveView = pView; if (m_pActiveView && *this)...
Hi, Nenad, Thank you very much, I have just checked the style of DLL dialog , I have only unchecked the Board. With checked the style to child, now looks fine. Thanks again. Best Regards
@nenadstefanovic Would you please help check ?
Hi, All, I have exported a CFormView from DLL(in WTL) by interface struct IDLLFormView { virtual ~IDLLFormView() { } virtual HWND Initialize(HWND hParentWnd) = 0;// call Formview's create virtual BOOL DllMessage(MSG* pMsg) = 0;//call Formview's PreTranslateMessage }; The exe has original Formview but I don't create it; exe has a member point: IDLLFormView* m_pDllFormView = 0; After click toolbar button i will create the formview : ~~~ initialize m_pDllFormView by helper function; then m_hWndClient...
Hi, All, I have exported a CFormView from DLL(in WTL) by interface struct IDLLFormView { virtual ~IDLLFormView() { } virtual HWND Initialize(HWND hParentWnd) = 0;// call Formview's create virtual BOOL DllMessage(MSG pMsg) = 0;//call Formview's PreTranslateMessage }; The exe has original Formview but I don't create it; exe has a member point: IDLLFormView m_pDllFormView = 0; After click toolbar button i will create the formview : initialize m_pDllFormView by helper function; then m_hWndClient = m_pDllFormView->Initialize(m_hWnd);...