How to get the pointer of "this" ?

John Chapman johnch_atms at hotmail.com
Tue May 26 12:41:20 UTC 2020


On Monday, 25 May 2020 at 16:26:31 UTC, Vinod K Chandran wrote:
> Here is my full code. Please take a look.
> https://pastebin.com/av3nrvtT

Change line 124 to:

SetWindowSubclass(this.mHandle, SUBCLASSPROC(&btnWndProc), 
UINT_PTR(subClsID), cast(DWORD_PTR)cast(void*)this);

That is, change `&this` to `cast(void*)this`.


More information about the Digitalmars-d-learn mailing list