Re: WindowProc in a class - function and pointer problem

2013-05-23 Thread Sean Cavanaugh
On 5/22/2013 8:49 PM, evilrat wrote: On Wednesday, 22 May 2013 at 21:42:32 UTC, D-sturbed wrote: Yes I'm in the multiple Window case, every window is wraped in a class and has its own message handler. I know that Win, in its callback system, often lets you retrieve a pointer to something, and

Re: WindowProc in a class - function and pointer problem

2013-05-23 Thread evilrat
On Thursday, 23 May 2013 at 06:31:02 UTC, Sean Cavanaugh wrote: I had a partial port of WTL over to D which worked well enough for what I needed, the core of the WndProc handling is down below. Each HWND is owned by the thread it was created on, so assigning it into D associative array

WindowProc in a class - function and pointer problem

2013-05-22 Thread D-sturbed
Hello, is there a way to wrap a WindowProc (so LRESULT WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) nothrow) in a class and to link it to a WindowClass without puting it as static ? Because defacto every datum used in the WindowProc must also be static. The problem

Re: WindowProc in a class - function and pointer problem

2013-05-22 Thread Simen Kjaeraas
On 2013-05-22, 21:30, D-sturbed wrote: Hello, is there a way to wrap a WindowProc (so LRESULT WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) nothrow) in a class and to link it to a WindowClass without puting it as static ? Because defacto every datum used in the

Re: WindowProc in a class - function and pointer problem

2013-05-22 Thread Diggory
On Wednesday, 22 May 2013 at 20:25:40 UTC, Simen Kjaeraas wrote: On 2013-05-22, 21:30, D-sturbed wrote: Hello, is there a way to wrap a WindowProc (so LRESULT WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) nothrow) in a class and to link it to a WindowClass without puting

Re: WindowProc in a class - function and pointer problem

2013-05-22 Thread D-sturbed
On Wednesday, 22 May 2013 at 21:22:52 UTC, Diggory wrote: On Wednesday, 22 May 2013 at 20:25:40 UTC, Simen Kjaeraas wrote: On 2013-05-22, 21:30, D-sturbed wrote: Hello, is there a way to wrap a WindowProc (so LRESULT WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) nothrow)

Re: WindowProc in a class - function and pointer problem

2013-05-22 Thread evilrat
On Wednesday, 22 May 2013 at 21:42:32 UTC, D-sturbed wrote: Yes I'm in the multiple Window case, every window is wraped in a class and has its own message handler. I know that Win, in its callback system, often lets you retrieve a pointer to something, and I haven't get it was possible in