Using delegate for WindowProc - possible ?

Tal publictal at gmail.com
Wed Dec 28 15:45:05 PST 2011


Can I do something like this :
______________________________________________________________________
extern (Windows) LRESULT delegate (HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam) MyWinProcDelegate;

this() {
	MyWinProcDelegate = &Events;
}

extern (Windows) LRESULT Events (HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam) {
	MessageBoxA(null , "Success!!!" , null ,0);
	return DefWindowProcA(hWnd, message, wParam, lParam);
}
______________________________________________________________________

The Events() doesn't seem to fire... am I missing something ?


More information about the Digitalmars-d-learn mailing list