since PB4, you have to place the Window parameter in the WindowID() function. In PB3.94, I was able to determine the current window using WindowID() without parameters.
However, I am making a custom gadget library and I thought it would be "handier" if the user doesn't need to supply the hWnd.
I am using Win32 API calls, like CreateWindowEx_() and so on.
Let's assume this is my current code:
Code: Select all
Procedure MyCustomGadget(Window, x, y, Width, Height)
CreateCustomGadget(WindowID(Window), x, y, Width, Height)
EndProcedureCode: Select all
Procedure MyCustomGadget(x, y, Width, Height)
Window=GetCurrentWindow()
CreateCustomGadget(Window, x, y, Width, Height)
EndProcedureI am asking how to achieve this, as I am sure there's a workaround, but I did not stumble in it yet.
Thanks! Any help is appreciated!


