If CreateGadgetList(WindowID())
MDIGadget(#GADGET_MDI, 110, 30, 690, 560, 0, 0 )
CloseGadgetList()
EndIf
defineproperties(#GADGET_MDI,@????????)
;in event loop to get properties of MDI
OpenConsole()
PrintN(Str(MDIprop\Width))
Input()
CloseConsole()
this wont work. any ideas of modifications to allow me to get to the structure that is defined in the library. i need to be able to access the original properties of the MDI in order to dock/undock the dockwindow and have the MDI resize as needed +/- the dockwindow width.
huh?--i have question marks in my code because i dont know what to actually put there. can someone look at my code and show me how to do this. ? the task is to be able to call the defineproperties procedure, and have it return a structure with the MDI gadget width height ect.
AFAIK, if the gadget is created in the exe, you can't use the gadget commands with it from the lib (maybe with #PB_Any?).
I would pass the MDIGadget window handle and use the API with it (GetClientRect_() for dimensions, GetWindowRect_()-->ScreenToClient_()-->ClientToScreen_() for position) to fill the structure.
ok, thanks for the advice, but without an example i have no idea where to start. i am not even sure about how correct the code i posted is in regards to the pointers and all. the structure created in the LIB is not recognized in the EXE at all.
intrigued, how do you mean? i mean, strings are just blocks of memory, so if a procedure / dll / function has to return a string, you just have to point it to a block of memory where it can dump it's string... i think i must be missing the point...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
blueznl wrote:intrigued, how do you mean? i mean, strings are just blocks of memory, so if a procedure / dll / function has to return a string, you just have to point it to a block of memory where it can dump it's string... i think i must be missing the point...
Nope I'm missing the point. D'oh!
What I need is for a ProcedureDLL function to return alphanumeric. Going off from what you said can you nudge my tricycle down the sidewalk a bit... via way of an example. I can't seem to get a string version of the LONG version shared early to work.
ProcedureDLL MyFunc(*var1.LONG,*var2.LONG,*var3.STRING)
*var1\l=1337
*var2\l=7777
*var3\s="666"
Debug *var3
ProcedureReturn(1)
EndProcedure
Try to not laugh to hard at my attempt!
Intrigued - Registered PureBasic, lifetime updates user