PanelGadget Question
In your case would also return the handle of the panel item etc. The handle of the static panel item is placed in the lParam field by Purebasic, not by Windows, as indeed the static window is added by Purebasic. Window's tab controls do not add these static containers by default, you have to do that yourself.
I have used the lParam method in various applications and it works fine, I've encountered no problems.
Code: Select all
GetParent_(GadgetID(FileList()\Editor))
I have used the lParam method in various applications and it works fine, I've encountered no problems.
I may look like a mule, but I'm not a complete ass.
That's why I thought it might be safer to leave it alone, but if you are not having any issues with it (and if it's future-proof), then all the better.srod wrote:The handle of the static panel item is placed in the lParam field by Purebasic, not by Windows, as indeed the static window is added by Purebasic.

What goes around comes around.
PB 5.21 LTS (x86) - Windows 8.1
PB 5.21 LTS (x86) - Windows 8.1
Aye, PB's panel gadget handles all of the static containers for us and it will always need to store the resulting handles somewhere - lParam is intended by MS for exactly that reason.
Some implementations of 'panel gadgets' based on Win tab-controls which I've seen in other languages do not use these static containers. Instead a list of controls is created for each tab and when the user selects a particular tab, these controls are simply repositioned etc. In this case lParam is typically used to point to the list etc.
So, in PB's case, I really cannot see a circumstance in which Freak would decide not to store the static hWnd in lParam etc.
Some implementations of 'panel gadgets' based on Win tab-controls which I've seen in other languages do not use these static containers. Instead a list of controls is created for each tab and when the user selects a particular tab, these controls are simply repositioned etc. In this case lParam is typically used to point to the list etc.
So, in PB's case, I really cannot see a circumstance in which Freak would decide not to store the static hWnd in lParam etc.

I may look like a mule, but I'm not a complete ass.
DO NOT change the lParm value!!!
Use it by all means. What I am saying is that I think it is safe to assume that lParam (in PB's case) will always hold the handle of the appropriate static container etc. that Freak will not change that anytime soon.
The only time I have changed the lParam value in the case of a panel gadget is when dynamically switching static containers around, but that involved more than just switching corresponding lParam values etc.


The only time I have changed the lParam value in the case of a panel gadget is when dynamically switching static containers around, but that involved more than just switching corresponding lParam values etc.
I may look like a mule, but I'm not a complete ass.