Interfaceing C++ using a Win32 GUI
BLS
nanali at nospam-wanadoo.fr
Tue Dec 4 13:59:59 PST 2007
Hi,
I am porting a huge C++ Windows GUI into D1. (no fun at all) But I
wonder if it is possible to keep the original C++ lib using D2's new
extern (C++) feature. Advantage is that I have less trouble regarding
the win header files, and I guess this approach will require less time.
BUT - I wonder how to manage the windows callbacks :
C++
BOOL CWnd::RegisterClassEx(WNDCLASSEX& wcx)
{
wcx.lpfnWndProc = /CWnd::StaticWindowProc/;
....
if (!::RegisterClassEx(&wcx))
....
}
static LRESULT CALLBACK StaticWindowProc(HWND hWnd, UINT uMsg, WPARAM
wParam, LPARAM lParam);
Of course this function has to be within the D code as
extern (windows) static ..., because we need to manage the eventhandling .
Mission impossible, good/bad idea, what do you think ?
Bjoern
More information about the Digitalmars-d
mailing list