lparam is passed by reference in this case as
(LPARAM)&DlghWnd)
then there is this
HWND *hw=(HWND*)lParam;
*hw=hWnd;
I don't understand what the typecasting (HWND*) is doing in this case. I've seen pointers created as, datatype * variable_name = address, such as HWND * hw = &lparam.i dont understand why the rhs of the equation is (HWND*)lparam instead of &lparam. Please explain why this is typecasted
d is assigned the address of a, which is the address of a pointer to int.
dereferencing d gives you the address of c which is 2293620 decimal / 0x22ff74 hex.
See how easy it is to get it wrong when you bypass the type system?