Question about property & method access scope.
Vinod K Chandran
kcvinu82 at gmail.com
Tue May 11 09:10:02 UTC 2021
Hi all,
I am practising D with a win api GUI hobby project.
I have a Window class and it resides in module window.d
My WndProc function resides in another module named
wnd_proc_module.d
Inside my WndProc, I get the Window class like this.
```d
Window win = cast(Window) (cast(void*) GetWindowLongPtrW(hWnd,
GWLP_USERDATA)) ;
```
So in many situations, I need to check some boolean properties of
Window class and call some functions of Window class in WndProc.
But I don't want to expose those props and functions to the user.
So if I make them private, I can't access them inside the WndProc
function. How do solve this issue. Thanks in advance.
More information about the Digitalmars-d-learn
mailing list