I have got a problem with the fsExtractCustomIcon function.
I want to return a HICON, but i dont know what the best solution is.
1. Should Java create an icon and convert it to hicon (what format is that?) or
2. Should Java return the icon name and native C should load this.
i tried 2nd for simplicity,
but my C-code does not work:
if (strlen(iconName) > 0)
{
HICON myIcon = NULL;
if(ExtractFlags & 1) {
myIcon = (HICON)LoadImage(theDll, MAKEINTRESOURCE(iconName), IMAGE_ICON, 16, 16, 0);
TheIcon = &myIcon;
} else {
myIcon = (HICON)LoadImage(theDll, MAKEINTRESOURCE(iconName), IMAGE_ICON, 32, 32, 0);
TheIcon = &myIcon;
}
}
====================
I found this somewhere in the forum.
Does that mean, that the icon has to be located in my DLL?
I want better a solution, where it can be loaded from my plugin directory.
Thank you for support,
Kenchi
Hi there,
maybe you should change your LoadImage function call to:
Btw. I'm not quite sure if MAKEINTRESOURCE(iconName) does really work since MAKEINTRESOURCE is usually used for identifiers and not for strings... Maybe you should try it without MAKEINTRESOURCE...
thank you for your help.
Displaying icons is one of the things, that i didnt get to function, until now,
because i dont know anything about icons in windows applications.
If your code block works it should be easy to add icons to file system plugins, for example. The format of the icon file is unknown to me (could you give me a hint to a icon tool as well?)
I will test it in next time.
2Lefteous:
Yes, the download link points to the same address than the sources link.
At the moment, a binary download is obsolete, because every installer comes up with the binary distribution.
The next step will be to provide downloads to a complete developement environment and CVS access to all sources (native code and java plugins).
Hello Lefteos, hi everyone,
this is my last update before my holidays start.
Have a look at the installers if you like and watch the project documentation containing checkstyle report and Java API.
The plugins itself are more Total Commander style now (filenames are pluginName.wlx, etc.)
Next step for the next version (again) is CVS access to the sources and the developement environment for download?
finally i released a new version of my Java Plugin Interface.
- Now there is full support for TC Version 7
- First 3rd party plugin (SNMP)
- Now with icon and preview bitmap support missing so far
Is there a possibility to add a "network neighborhood friendly name"? Now, your framework takes the CLASS entry from WFX section in tc_javaplugin.ini, right? There should be an entry to show a (more) user-friendly name in network neighborhood.
the class name from tc_javaplugin.ini does not define the name of the Root file system.
Instead a specific method return value in java, that is in the case of my plugins the class name:
the class name from tc_javaplugin.ini does not define the name of the Root file system.
Instead a specific method return value in java, that is in the case of my plugins the class name:
This is similar to the native plugins.
I dont want to make it another way. Everything should be defined in java.
Best regards,
Ken[/code]
Ok, sounds good
When I try to make an eclipse projekt using your tc_apis*.jar I get an UnsatisfiedLinkError for tc.library.name. Can you tell me what I need to add to the VM args within eclipse to make it work? I took the Drives plugin as example.
tc.library.name is not a system property to set in eclipse.
You can not test the plugin in Eclipse that way.
Only if the plugin class is loaded by the PluginClassloader, the constant library name "tc.library.name" is mapped to the DLL of the native Total Commander plugin file.
You should test the Java GUI standalone and if it works, you should embed it in your plugin class and Test it by calling Total Commander and starting your plugin.
Testing without TC is not easily possible
Perhaps i should create a possibility.
Hi all,
I have realized lately that I have a strange problem with a java plugin (SNMP Plugin). The problem seems anyway to be associated to the java environment of that plugin only.
The error is this:
Class not found class='tcclassloader/PlugiClassLoader'. Please korrect the class name ecc ecc
I have other java plugins, like for example the JAD one and they are instead working fine, without problems. It seems like only this special plugin has problems..
I installed the plugins in the default locations, so as .ini files are pointing to the correct locations.
as far as i remember it could be the java version.
Some plugins use 1.6 features, so maybe?
The java version is normally detected by searching in the registry.
And there is also a strangeness with JRE:
If you uninstall a java version, the registry key can become invalid.
Check the following key with regedit:
path: HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment
key: CurrentVersion
value should be: 1.6
There shoud be a path:
HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime\\1.6
key: RuntimeLib
value should point to a valid jvm.dll in the Java home directory
But, if its true, that if JAD plugin works, it maybe only the version, thats wrong.
Hi,
thanks kenchis I checked it and the registry keys and path are ok and as you told.
How one can understand which version of java the plugin is supposed to have? Beside the plugin documentation, that is not telling much in this case, as far as I can see