-
I am really curious how far the ThinBASIC embedding could be pushed. I consider this area very interesting.
For random forum visitors - this release contains updated TBGL module with support for Drag&Drop. If you ever tried to do this using Win32 API, you are probably gray haired man now. With TBGL, it gets more simple:
Step #1: Subscribe for receiving notification about files being dragged to your window
Code:
' -- The following enables programmer to handle dropping files to window
' -- The window is identified via hWnd handle
' -- Once the event occurs, the function Main_OnDropFiles will be launched
TBGL_BindWindowEvent(hWnd, %TBGL_OnDropFiles, Main_OnDropFiles)
Of course -the function does not need to be called Main_OnDropFiles, you are free to choose any other function name.
Step #2: Handle the event
Code:
' -- Function fired thanks to previous bind using TBGL_BindWindowEvent
Function Main_OnDropFiles()
' -- Retrieve number of files
Long nFiles = TBGL_OnDropFiles_GetFileCount()
Long i
' -- Iterate through all of them and list their names
For i = 1 To nFiles
MsgBox TBGL_CallingWindow, "File " + Format$(i) + " is " + TBGL_OnDropFiles_GetFileName(i)
Next
End Function
Petr
-
Some nosy question here: I checked the inc/lib-folders for freeimage - there's none inside...haven't they been there before some time?
so I downloaded from sourceforge and play around with the vb-wrapper in thinAir ;)
... now there are a few things inside that let me wonder a little bit, a couple of very specific types and constants that become blue and bold... so is there some FreeImage-module or new wrapper planned? Or this just coincidences?
for example this:
Code:
%BLACKONWHITE ' As Long = 1
%WHITEONBLACK 'As Long = 2
%COLORONCOLOR ' As Long = 3
'or
Type RGBQuad
Type RGBTriple
become bold'n blue.
might I just make seperate constants or take them as they are in tB? - Or should I stop playing around with that wrapper?
-
1 Attachment(s)
Yes, they are defined into UI module.
Regarding FreeImage I had some ideas in the past but very little time to work on it.
I wanted to create a thinBasic module.
I have the attached INC file, quite old.
Maybe it can help.
-
1 Attachment(s)
Here's my answer - with yours up there and the one of Petr I was able to compare & find out about some variable-types & stuff- there's some small incompatibility with some types (dynamic UDT-subsets) - which I left in commented - also there are a few Functions wich await some
"Optional Byval Value As Whatever = 123" - I'm not sure about them so I left the defaults commented near the function. But this needs new Version 3.15.4. of freeImage.dll which you'll find inside \Dist-Subfolder there.
It's pretty much plain Basic since I took the vb6-wrapper as a base for this - and I tried to arrange it as clearly as possible to keep overview :)
-
Hi, all,
Of the two(2) FreeImage,zip's on this page, do either or both
have anything to do with the FreeImage.dll that is in Rene's
TBGL3dEd1.05b.zip?
Bill
-
the one that is included in TBGL3dEd is an older version of freeImage.dll but serves to load common texture-files. The new version can load more different formats and also has a few changed and a couple of new functions.
You should not use the inc-files posted here together with the freeImage.dll which is included in 3d-Ed-download.
But you can use the new version (3.15.4. see links post above) of freeImage.dll together with 3d-Ed/ or replace the one in 3d-Ed-folder. All used functions still work the same way. Although the version 3.I.dunno something has only half the size and as long as I don't use any functions of the new freeImage.dll it will serve the purpose.