Hi,
I'm using a DLL which creates a window for displaying an image. I'd like to attach this to the CView subclass object in my MFC app so that i can manipulate the image using the standard windows messages and handlers, e.g. MouseScroll etc.
I've tried:
This doesn't work - it crashes trying to assert wincore.cpp line 384.
I've also tried using SubclassWindow, which doesn't have the same assertion failure, but does tell me that I'm trying to subclass a window with the incorrect derrived class.
Does anyone know how I can do this - all I want to do is move the window that I've been given by the DLL around.
Many thanks,
Dmosses.
I'm using a DLL which creates a window for displaying an image. I'd like to attach this to the CView subclass object in my MFC app so that i can manipulate the image using the standard windows messages and handlers, e.g. MouseScroll etc.
I've tried:
Code:
HWND h_displayWnd = GetHwnd(hDisplayObj);
//detach window created with CView
topView->Detach();
//attach my HWND
topView->Attach(h_displayWnd);
This doesn't work - it crashes trying to assert wincore.cpp line 384.
I've also tried using SubclassWindow, which doesn't have the same assertion failure, but does tell me that I'm trying to subclass a window with the incorrect derrived class.
Does anyone know how I can do this - all I want to do is move the window that I've been given by the DLL around.
Many thanks,
Dmosses.